<BR>
<BLOCKQUOTE>
<P>Oh...</P>
<P>Then wat will happen if i remove from renderer and then delete..?? will it lead to crashing of app..??</P>
<P>Thanks<BR>---------- Original message ----------<BR>From:"Bill Lorensen"< bill.lorensen@gmail.com ><BR>Date: 27 Jun 10 00:14:42<BR>Subject: Re: Re: [vtkusers] What exactly happens in this scenario?<BR>To: Rakesh Patil <rakeshthp@in.com><BR><BR>You need not remove it from the renderer. The renderer as part of its<BR>destructor will UnRegister() it's actors. Once the ref count of the<BR>actor goes to 0, it will be deleted.<BR><BR>On Sat, Jun 26, 2010 at 12:29 PM, Rakesh Patil <rakeshthp@in.com> wrote:<BR>> hi,<BR>><BR>> thanks.. then wat about the actor?? should it be removed from the renderer<BR>> and then, deleted or<BR>> if i delete, it is directly removed from the renderer??<BR>><BR>> Thanks<BR>><BR>> ---------- Original message ----------<BR>> From:"Bill Lorensen"< bill.lorensen@gmail.com ><BR>> Date: 25 Jun 10 18:23:59<BR>> Subject: Re: [vtkusers] What exactly happens in this scenario?<BR>> To: logic_cube &
lt;John.Fraser@icr.ac.uk><BR>><BR>> In the destructor? Technically, yes. But it won't matter.<BR>><BR>> On Fri, Jun 25, 2010 at 8:51 AM, logic_cube <John.Fraser@icr.ac.uk> wrote:<BR>>><BR>>> Shouldn't it be like this?<BR>>><BR>>> if (elementNumberActor != NULL)<BR>>> {<BR>>> elementNumberActor->Delete();<BR>>> elementNumberActor = NULL;<BR>>> }<BR>>><BR>>><BR>>><BR>>> Bill Lorensen-2 wrote:<BR>>>><BR>>>> Yes, it will leak.<BR>>>><BR>>>> To prevent the leak,, in your constructor,<BR>>>> elementNumberActor = NULL;<BR>>>& gt;<BR>>>> In DisplayElementNumbers() before assigning the actor,<BR>>>> if (elementNumberActor != NULL)<BR>>>> {<BR>>>> elementNumberActor->Delete();<BR>>>> }<BR>>>><BR>>>> In the destuctor,<BR>>>> if (elementNumberActor != NULL)<BR>>
>> {<BR>>>> elementNumberActor->Delete();<BR>>>> }<BR>>>><BR>>>><BR>>><BR>>> --<BR>>> View this message in context: <a<BR>>> href="http://old.nabble.com/What-exactly-happens-in-this-scenario--tp28991361p28991987.html"<BR>>> target="_blank">http://old.nabble.com/What-exactly-happens-in-this-scenario--tp28991361p28991987.html</a><BR>>> Sent from the VTK - Users mailing list archive at Nabble.com.<BR>>><BR>>> _______________________________________________<BR>>> Powered by <a href="http://www.kitware.com"<BR>>> target="_blank">www.kitware.com</a><BR>>><BR>>> Visit other Kitware open-source projects at <a<BR>>> href="http://www.kitware.com/opensource/opensou rce.html"<BR>>> target="_blank">http://www.kitware.com/opensource/opensource.html</a><BR>>><BR>>> Please keep messages on-topic and check the VTK FAQ
at: <a<BR>>> href="http://www.vtk.org/Wiki/VTK_FAQ"<BR>>> target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><BR>>><BR>>> Follow this link to subscribe/unsubscribe:<BR>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers"<BR>>> target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><BR>>><BR>> _______________________________________________<BR>> Powered by <a href="http://www.kitware.com"<BR>> target="_blank">www.kitware.com</a><BR>><BR>> Visit other Kitware open-source projects at <a<BR>> href="http://www.kitware.com/opensource/opensource.html"<BR>> target="_blank">http://www.kitware.com/opensource/opensource.html</a><BR>><BR>> Please keep messages on-topic and check the VTK FAQ at: <a<BR>> href="http://www.vtk.org/Wiki/VTK_FAQ"<BR>> target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><BR>><BR>> Follow this link to subscri
be/unsubscribe:<BR>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><BR>><BR>><BR>> Get Yourself a cool, short @in.com Email ID now!<BR></P></BLOCKQUOTE><br><br><div style="border-top:1px dashed #ccc; border-bottom:1px dashed #ccc; padding:5px;"><a href="http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing" style="font:13px arial; color:#1E56A1; text-decoration:none;">Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></div>