[vtkusers] Constructor with parameters
Jana Sefcikova
neollie at gmail.com
Wed Aug 1 06:58:49 EDT 2012
I had feeling that it is not possiible but I read
example<http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers> about
vtkSmartPointers and there is written this :
"You may need to wrap a raw pointer because you need to use a constructor
that takes arguments. In this situation, use the Take method. This passes
the object's self-ownership to the smart pointer:
class MySpecialClass : public vtkObject { /* ... */ };
MySpecialClass* MyObjectRaw = new MyObject(arguments);
vtkSmartPointer<MySpecialClass> MyObject;
MyObject.Take(MyObjectRaw);
"
This is origin of my question. It looks that it is not correct there
(perhaps anymore).
Jana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120801/cbfa9066/attachment.htm>
More information about the vtkusers
mailing list