[vtkusers] Delete

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Mon Mar 4 07:19:09 EST 2002


> For some filters, I have observed that the Delete command won't work..the
> memory don't get deleted when I tried to run Delete command on the
filters.
> How to delete an vtk Object ?

Delete() does work, but thanks to the (sometimes overzealous) reference
counting used. you need to make sure that the outouts of the filter are
disconnected first.
See vtkSource->UnregisterAllOutputs() or whatever it's called.
(If you don't do this, the filter stays in memory, because the outputs have
it referenced as their "source")
then call Delete() on the filter.


(Can't remebmber if you need to Set all Inputs to NULL too, I think not
probably)

JB




More information about the vtkusers mailing list