[vtkusers] What exactly happens in this scenario?
Rakesh Patil
rakeshthp at in.com
Sat Jun 26 15:12:39 EDT 2010
Oh... Then wat will happen if i remove from renderer and then delete..?? will it lead to crashing of app..?? Thanks Original message From:"Bill Lorensen"< bill.lorensen at gmail.com >Date: 27 Jun 10 00:14:42Subject: Re: Re: [vtkusers] What exactly happens in this scenario?To: Rakesh Patil You need not remove it from the renderer. The renderer as part of itsdestructor will UnRegister() it's actors. Once the ref count of theactor goes to 0, it will be deleted.On Sat, Jun 26, 2010 at 12:29 PM, Rakesh Patilwrote:> 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:59> Subject: 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 l
ike this?>>>> if (elementNumberActor != NULL)>> {>> elementNumberActor>Delete();>> elementNumberActor = NULL;>> }>>>>>>>> Bill Lorensen2 wrote:>>>>>> Yes, it will leak.>>>>>> To prevent the leak,, in your constructor,>>> elementNumberActor = NULL;>>& gt;>>> In DisplayElementNumbers() before assigning the actor,>>> if (elementNumberActor != NULL)>>> {>>> elementNumberActor>Delete();>>> }>>>>>> In the destuctor,>>> if (elementNumberActor != NULL)>>> {>>> elementNumberActor>Delete();>>> }>>>>>>>>>> >> View this message in context: > href="http://old.nabble.com/Whatexactlyhappensinthisscenariotp28991361p28991987.html">> target="blank">http://old.nabble.com/Whatexactlyhappensinthisscenariotp28991361p28991987.html>> Sent from the VTK Users mailing list archive at Nabble.com.>>>> >> Powered by > target="blank">www.kitware.com>>>> Visit other Kitware opensource projects at > href="http://www.kitware.com/opensource/opensou rce.html">> target="blank">http://www.kitware.com/opensource
/opensource.html>>>> Please keep messages ontopic and check the VTK FAQ at: > href="http://www.vtk.org/Wiki/VTKFAQ">> target="blank">http://www.vtk.org/Wiki/VTKFAQ>>>> Follow this link to subscribe/unsubscribe:>> > target="blank">http://www.vtk.org/mailman/listinfo/vtkusers>>> > Powered bytarget="blank">www.kitware.com>> Visit other Kitware opensource projects athref="http://www.kitware.com/opensource/opensource.html"> target="blank">http://www.kitware.com/opensource/opensource.html>> Please keep messages ontopic and check the VTK FAQ at:href="http://www.vtk.org/Wiki/VTKFAQ"> target="blank">http://www.vtk.org/Wiki/VTKFAQ>> Follow this link to subscribe/unsubscribe:> http://www.vtk.org/mailman/listinfo/vtkusers>>> Get Yourself a cool, short @in.com Email ID now!Get Yourself a cool, short @in.com Email ID now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100627/33b6be8c/attachment.htm>
More information about the vtkusers
mailing list