<DIV>
<P>Hello,<BR>I know vtkSmartPointer, and my template is much inspired from it.<BR>But, I don't understand how to use it in order to do what i want :</P>
<P>Let's have a look at your example :</P>
<P>vtkSmartPointer<vtkConeSource> cone =<BR> vtkSmartPointer<vtkConeSource>::New();<BR></P>
<P>It calls the constructors :</P>
<P><FONT size=2>vtkSmartPointer(T* r): vtkSmartPointerBase(r) {}</FONT></P>
<P><FONT size=2>wich calls</FONT></P>
<P><FONT size=2>vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase* r):<BR> Object(r)<BR>{<BR> this->Register();<BR>}<BR></FONT><FONT size=2></FONT></P>
<P><FONT size=2>destructors :</FONT></P>
<P><FONT size=2>vtkSmartPointerBase::~vtkSmartPointerBase()<BR>{<BR> this->UnRegister();<BR>}<BR></FONT></P>
<P><FONT size=2>The problem is this->Register(); in vtkSmartPointerBase constructor.</FONT></P>
<P><FONT size=2>This is the main difference with my template.</FONT></P>
<P><FONT size=2>So your code doesn't work because we still need to call cone->Delete();</FONT></P>
<P><FONT size=2>What am I missing ?</P></FONT></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>