[vtkusers] A template to avoid calling vtkObjectBase->Delete()

REGAT-BARREL Aurélien arbvtk at yahoo.fr
Wed Apr 28 12:37:59 EDT 2004


    Brad King <brad.king at kitware.com> wrote:
    > vtkSmartPointer cone =
    > vtkSmartPointer::New();
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    There is a special New() method in the vtkSmartPointer that returns a
    smart pointer to an object with a total reference count of 1.

So, that's what I missed.
    typedef vtkSmartPointer<vtkConeSource> vtkConeSourcePtr;

    vtkConeSourcePtr cone = vtkConeSourcePtr::New();
doesn't compile.
I use "vtk42-LatestRelease.exe".
I will do a CVS update.
So this is a "fresh feature".
When will it be added in an official release ?
Does-it mean that in the future vtkSmartPointer will be often used ?


Aurélien REGAT-BARREL
Yahoo! Mail - Votre e-mail personnel et gratuit qui vous suit partout !
 Créez votre adresse sur http://mail.yahoo.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040428/ffa3d618/attachment.htm>


More information about the vtkusers mailing list