<div dir="ltr"><div><div>Hi Jorge,<br><br></div>Thank you very much!<br><br></div>-Mingcheng<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 29, 2015 at 11:06 AM, Jorge Perez <span dir="ltr"><<a href="mailto:josp.jorge@gmail.com" target="_blank">josp.jorge@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, you can read here about that topic <a href="http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers" target="_blank">http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers</a><br><br></div>HTH<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-03-29 18:00 GMT+02:00 Mingcheng Chen <span dir="ltr"><<a href="mailto:linyufly@gmail.com" target="_blank">linyufly@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hello,<br><br></div>I am always prudent when using VTK, i. e. I never mix the smart pointer and normal pointer of VTK objects.<br><br></div>I have a concern. Suppose we have<br><br></div>vtkPolyData *mesh = some_function_which_returns_vtkPolyData_star(...);<br></div>vtkSmartPointer<vtkPolyData> mesh_ptr = vtkSmartPointer<vtkPolyData>(mesh);<br><br></div>we should do mesh_ptr->Delete() after, right?<br><br></div>However, can we do<br><br></div>vtkSmartPointer<vtkPolyData> mesh_ptr = vtkSmartPointer<vtkPolyData>(some_function_which_returns_vtkPolyData_star(...));<br><br>?<br><br></div>If we do that, how can we delete the reference count to the object before passing it to vtkSmartPointer?<br><br></div>Thanks!<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">-Mingcheng<br></font></span></div>
<br></div></div>_______________________________________________<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>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Research Assistant in Graphics Group<br></div>
<div>University of Illinois at Urbana-Champaign</div><div><a href="http://mingchengchen.org" target="_blank">http://mingchengchen.org</a></div></div></div>
</div>