hi,<br><br>thanks.. then wat about the actor?? should it be removed from the renderer and then, deleted or <br>if i delete, it is directly removed from the renderer??<br><br>Thanks<br><blockquote><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 <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 href="http://old.nabble.com/What-exactly-happens-in-this-scenario--tp28991361p28991987.html" 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" target="_blank">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensou
rce.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" 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" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>
Follow this link to subscribe/unsubscribe:<br>http://www.vtk.org/mailman/listinfo/vtkusers<br></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>