<DIV>
<P>&nbsp;&nbsp;&nbsp; de Boer Ingo &lt;<A href="mailto:I.deBoer@polytec.de">I.deBoer@polytec.de</A>&gt; wrote:<BR>&nbsp;&nbsp;&nbsp; Hi,<BR>Hello,</P>
<P>&nbsp;&nbsp;&nbsp; I did a similar approach based on M$ CAutoPtr class<BR>&nbsp;&nbsp;&nbsp; shipped with the Visual Studio.<BR>&nbsp;&nbsp;&nbsp; I guess, it is better to make it a bit more safe...<BR>&nbsp;&nbsp;&nbsp; Maybe this could be a suggestion for making <BR>&nbsp;&nbsp;&nbsp; vtkSmartPointer a bit safer ?<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; The usage is like:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CVtkPtr pvtkAxes;<BR>&nbsp;&nbsp;&nbsp; pvtkAxes.Create();<BR>&nbsp;&nbsp;&nbsp; pvtkAxes-&gt;SetOrigin(0, 0, 0);<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; and you can ask for result of create to do something<BR>&nbsp;&nbsp;&nbsp; when the creation fails...</P>
<P>It is interesting.<BR>I also thought about a Create fonction (directly in the constructor).<BR>But i am wondering if it is not better to minimalize the impact on "traditional" VTK code.<BR>With my first example, if a guy has not my template header, he can change the typedef<BR>&nbsp;&nbsp;&nbsp; typedef vtkClassPtr&lt; vtkConeSource &gt; vtkConeSourcePtr;<BR>to<BR>&nbsp;&nbsp;&nbsp; typedef vtkConeSource * vtkConeSourcePtr;<BR>And it works (but with potential memory leaks...)<BR></P></DIV><BR><BR>Aurélien REGAT-BARREL<p>
                <hr size=1>
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/mail/mail_taglines/default/*http://fr.benefits.yahoo.com/">Créez votre Yahoo! Mail</a>
<br><br>
Dialoguez en direct avec vos amis grâce à <a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com/">Yahoo! Messenger !</a>