[vtkusers] Does ->Delete() free all resources?

Charl P. Botha cpbotha at gmail.com
Wed Nov 24 12:52:43 EST 2004


On Tue, 23 Nov 2004 09:51:31 -0700, Andrew Wilford <andrew at artwork.com> wrote:
> This was as I suspected. You are saying though, that deletion of the top
> level parent will result in all dependencies in the pipeline to be deleted
> and the memory freed as well? That might make things easier as I have the

If you mean by "top level parent" the LAST object that you have a
reference on (i.e. for all other New()s you've already called
Delete()), then the answer is yes.

> pipeline spread across several classes and keeping track of which parameters
> need to be set to NULL is quite complicated. It might be easier to delete
> the renderer and re-initialize everything on the fly.

You don't have to disconnect anything.  If you have no more explicit
refs, everything will automatically disappear.  Also don't forget your
friend vtkRenderer::RemoveAllProps(). :)

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list