<div>I have made a VTK render application which i run in a MEX file, which i call from matlab.</div>
<div>It seems to be working great, but when i shut the window generated by VTK, the whole thing crashes, and matlab goes down as well.</div>
<div>I call delete on all my objects and such, but still there comes error. </div>
<div>Is there a special way to exit VTK gently without making it crash?</div>
<div> </div>
<div>Thank you</div>