<br><div class="gmail_quote">On Fri, Nov 6, 2009 at 11:38 AM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Your member variable does not have to be a smartpointer. If it is not,<br>
you&#39;ll have to Register it on a Set. And UnRegister on destruction.<br>
 If you use the vtkSetObject macro, it will do the proper<br>
register/unregister. You will still have to UnRegister in the the<br>
descturcotr if it is not null.<br>
<div><div></div><div class="h5"></div></div></blockquote><div><br>Sorry to be such a pain about this...<br><br>If the member variable IS a smart pointer, then does it do the register/unregister automatically? Is it recommended to have member variables as smart pointers or not? If you DO make the member variable a smart pointer, you must break the &quot;don&#39;t include any headers but your superclass&quot; rule. Is that allowed in this case? <br>
<br>I switched to <br>vtkSetObjectMacro(Ray, vtkRay);<br>in an attempt to have it do the register/unregister automatically, but it simply segfaults when I call SetRay.<br><br>The updated and simplified files are here:<br>
<a href="http://www.rpi.edu/%7Edoriad/VTK_List/DeletingUnknownObject/" target="_blank">http://www.rpi.edu/~doriad/VTK_List/DeletingUnknownObject/</a><br><br clear="all">Thanks,<br><br>David <br></div></div>