[vtkusers] Dispose to vtk objects

David Cole dlrdave at aol.com
Mon Jun 24 17:13:07 EDT 2013



> Yes, the question is why in the first example we have dispose and in the
> second we dont ?
> I was looking at the two examples in the activiz users guide
> http://www.kitware.com/KWLD/download/download.php?cid=anonymous&fid=63&pid=17


The answer is probably just “it was either not really necessary in the first example, or it was a documentation oversight, and it was overlooked in the second example”...


That document is from 2008, and certainly does not represent the best coding style ever.


I’d leave out all the Dispose calls unless they are proven necessary. (If you run into weird window close or shutdown crashes... something might need to be removed from a rendering view, but you still shouldn’t need explicit Dispose calls in most cases.)



HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130624/ae9a7dee/attachment.htm>


More information about the vtkusers mailing list