[vtkusers] vtkTransform concatenation

David Gobbi dgobbi at imaging.robarts.ca
Wed May 12 18:15:45 EDT 2004


Hi Neilson,

VTK's garbage collection takes care of this for you.
When you concatenate 'b', the reference count of 'b' is
incremented so you can safely call delete on it,
it will stick around until 'a' is deleted.

To answer your questions:

1. if you delete 'a', then 'b' will only be destroyed if you have
   already deleted 'b' once before.

2. if you delete 'b', it won't actually be destroyed until after you
   have deleted 'a' (or until you have called "Identity" on 'a').

 - David

On Wed, 12 May 2004, N.E Mackenzie-Mackay wrote:

> Quick question.  Say I had two vtkTransform's: 'a' and 'b'
>
> if I concatenated a with b: a->concatenate(b);
>
> 	1. if I deleted 'a' would this delete 'b'.
> 	2. if I delete 'b' would this screw up the pipeline for 'a'
>
> Thanks,
> Neilson
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list