<div dir="ltr">Thanks very much.<br><br>Jothy<br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 2:00 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">If this-&gt;imageData is a smart pointer, the delete will happen<br>
automatically once it get out of scope.<br>
But if you really want to delete the object at that point, you can do<br>
something like that as well.<br>
<br>
this-&gt;imageData = NULL;<br>
<div><div></div><div class="h5"><br>
On Thu, Aug 25, 2011 at 7:28 AM, Jothy &lt;<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; This is  c++ question rather than a vtk one, sorry for that.<br>
&gt;<br>
&gt; If I use<br>
&gt;<br>
&gt; this-&gt;imageData=vtkSmartPointer&lt;vtkImageData&gt;::New();<br>
&gt;<br>
&gt; Should I call<br>
&gt;<br>
&gt; this-imageData-&gt;Delete() in the destructor of the class?<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Jothy<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br></div>