[vtkusers] What exactly happens in this scenario?

Rakesh Patil rakeshthp at in.com
Sat Jun 26 12:29:37 EDT 2010


hi,thanks.. then wat about the actor?? should it be removed from the renderer and then, deleted or if i delete, it is directly removed from the renderer??Thanks Original message From:"Bill Lorensen"< bill.lorensen at gmail.com >Date: 25 Jun 10 18:23:59Subject: Re: [vtkusers] What exactly happens in this scenario?To: logiccube In the destructor? Technically, yes. But it won't matter.On Fri, Jun 25, 2010 at 8:51 AM, logiccubewrote:>> Shouldn't it be like this?>> if (elementNumberActor != NULL)> {> elementNumberActor>Delete();> elementNumberActor = NULL;> }>>>> Bill Lorensen2 wrote:>>>> Yes, it will leak.>>>> To prevent the leak,, in your constructor,>> elementNumberActor = NULL;>>>> In DisplayElementNumbers() before assigning the actor,>> if (elementNumberActor != NULL)>> {>> elementNumberActor>Delete();>> }>>>> In the destuctor,>> if (elementNumberActor != NULL)>> {>> elementNumberActor>Delete();>> }>>>>>> > View this message in context: http://old.nabble.com/Whatexactlyhappensin
 thisscenariotp28991361p28991987.html> Sent from the VTK  Users mailing list archive at Nabble.com.>> > Powered by www.kitware.com>> Visit other Kitware opensource projects at http://www.kitware.com/opensource/opensource.html>> Please keep messages ontopic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTKFAQ>> Follow this link to subscribe/unsubscribe:> http://www.vtk.org/mailman/listinfo/vtkusers>Powered by www.kitware.comVisit other Kitware opensource projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages ontopic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTKFAQFollow this link to subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusersGet Yourself a cool, short @in.com Email ID now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100626/278ff004/attachment.htm>


More information about the vtkusers mailing list