<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"&lt; bill.lorensen@gmail.com &gt;<BR>Date: 27 Jun 10 00:14:42<BR>Subject: Re: Re: [vtkusers] What exactly happens in this scenario?<BR>To: Rakesh Patil &lt;rakeshthp@in.com&gt;<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 &lt;rakeshthp@in.com&gt; wrote:<BR>&gt; hi,<BR>&gt;<BR>&gt; thanks.. then wat about the actor?? should it be removed from the renderer<BR>&gt; and then, deleted or<BR>&gt; if i delete, it is directly removed from the renderer??<BR>&gt;<BR>&gt; Thanks<BR>&gt;<BR>&gt; ---------- Original message ----------<BR>&gt; From:"Bill Lorensen"&lt; bill.lorensen@gmail.com &gt;<BR>&gt; Date: 25 Jun 10 18:23:59<BR>&gt; Subject: Re: [vtkusers] What exactly happens in this scenario?<BR>&gt; To: logic_cube &
 lt;John.Fraser@icr.ac.uk&gt;<BR>&gt;<BR>&gt; In the destructor? Technically, yes. But it won't matter.<BR>&gt;<BR>&gt; On Fri, Jun 25, 2010 at 8:51 AM, logic_cube &lt;John.Fraser@icr.ac.uk&gt; wrote:<BR>&gt;&gt;<BR>&gt;&gt; Shouldn't it be like this?<BR>&gt;&gt;<BR>&gt;&gt; if (elementNumberActor != NULL)<BR>&gt;&gt; {<BR>&gt;&gt; elementNumberActor-&gt;Delete();<BR>&gt;&gt; elementNumberActor = NULL;<BR>&gt;&gt; }<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; Bill Lorensen-2 wrote:<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Yes, it will leak.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; To prevent the leak,, in your constructor,<BR>&gt;&gt;&gt; elementNumberActor = NULL;<BR>&gt;&gt;&amp; gt;<BR>&gt;&gt;&gt; In DisplayElementNumbers() before assigning the actor,<BR>&gt;&gt;&gt; if (elementNumberActor != NULL)<BR>&gt;&gt;&gt; {<BR>&gt;&gt;&gt; elementNumberActor-&gt;Delete();<BR>&gt;&gt;&gt; }<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; In the destuctor,<BR>&gt;&gt;&gt; if (elementNumberActor != NULL)<BR>&gt;
 &gt;&gt; {<BR>&gt;&gt;&gt; elementNumberActor-&gt;Delete();<BR>&gt;&gt;&gt; }<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; --<BR>&gt;&gt; View this message in context: &lt;a<BR>&gt;&gt; href="http://old.nabble.com/What-exactly-happens-in-this-scenario--tp28991361p28991987.html"<BR>&gt;&gt; target="_blank"&gt;http://old.nabble.com/What-exactly-happens-in-this-scenario--tp28991361p28991987.html&lt;/a&gt;<BR>&gt;&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<BR>&gt;&gt;<BR>&gt;&gt; _______________________________________________<BR>&gt;&gt; Powered by &lt;a href="http://www.kitware.com"<BR>&gt;&gt; target="_blank"&gt;www.kitware.com&lt;/a&gt;<BR>&gt;&gt;<BR>&gt;&gt; Visit other Kitware open-source projects at &lt;a<BR>&gt;&gt; href="http://www.kitware.com/opensource/opensou rce.html"<BR>&gt;&gt; target="_blank"&gt;http://www.kitware.com/opensource/opensource.html&lt;/a&gt;<BR>&gt;&gt;<BR>&gt;&gt; Please keep messages on-topic and check the VTK FAQ
  at: &lt;a<BR>&gt;&gt; href="http://www.vtk.org/Wiki/VTK_FAQ"<BR>&gt;&gt; target="_blank"&gt;http://www.vtk.org/Wiki/VTK_FAQ&lt;/a&gt;<BR>&gt;&gt;<BR>&gt;&gt; Follow this link to subscribe/unsubscribe:<BR>&gt;&gt; &lt;a href="http://www.vtk.org/mailman/listinfo/vtkusers"<BR>&gt;&gt; target="_blank"&gt;http://www.vtk.org/mailman/listinfo/vtkusers&lt;/a&gt;<BR>&gt;&gt;<BR>&gt; _______________________________________________<BR>&gt; Powered by &lt;a href="http://www.kitware.com"<BR>&gt; target="_blank"&gt;www.kitware.com&lt;/a&gt;<BR>&gt;<BR>&gt; Visit other Kitware open-source projects at &lt;a<BR>&gt; href="http://www.kitware.com/opensource/opensource.html"<BR>&gt; target="_blank"&gt;http://www.kitware.com/opensource/opensource.html&lt;/a&gt;<BR>&gt;<BR>&gt; Please keep messages on-topic and check the VTK FAQ at: &lt;a<BR>&gt; href="http://www.vtk.org/Wiki/VTK_FAQ"<BR>&gt; target="_blank"&gt;http://www.vtk.org/Wiki/VTK_FAQ&lt;/a&gt;<BR>&gt;<BR>&gt; Follow this link to subscri
 be/unsubscribe:<BR>&gt; &lt;a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank"&gt;http://www.vtk.org/mailman/listinfo/vtkusers&lt;/a&gt;<BR>&gt;<BR>&gt;<BR>&gt; 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>