[vtkusers] Pseudo memory leak problem with C# and vtk component

Theodore Holden theodoreholden at yahoo.com
Thu May 14 12:17:16 EDT 2009


The problem I was seeing earlier involved interactors and the fact that the interactor.start function does not return, apparently ever, until the renderwindow in question is destroyed.  Most of the examples I see include the creation of an interactor and the interactor.start call;  in most cases the examples pop a renderwindow up as a dialog and the user gets rid of it before proceeding to a next step and there is no problem.

Most examples also have vtk objects declared locally in functions called add_somethingorother_to_window and if you do that, then eliminating the interactor lines produces pathology the first time you go to do any sort of an interaction type thing (like adjusting opacity) programmatically.  If you make the vtk objects class level and eliminate the interactor lines, then all problems go away.

Documentation should probably include some sort of a warning about this for the benefit of people trying to use the vtk components.  The same behavior occurs using either the Sourceforge or Kitware version of wrapper libraries and components.


Ted


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090514/f5746cb3/attachment.htm>


More information about the vtkusers mailing list