[vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy
Berti Krüger
berti_krueger at hotmail.com
Wed Oct 24 18:19:08 EDT 2018
Hello.
I (hopefully) already understand the difference between the ShallowCopy and the DeepCopy method (e.g. copying only the pointer vs. copying the pointer and the content pointed to).
But what i don't understand yet is, what is the difference between using the overloaded assignment operator of vtkSmartPointer and the ShallowCopy method, e.g. what is the difference between
vtkSmartPointer<vtkPolydata> myStrangePolydata = vtkSmartPointer<vtkPolydata>::New();
myStrangePolydata = vtkTransmogrifyFilter->GetOutput();
and
myStangePolydata->ShallowCopy(vtkTransmogrifyFilter->GetOutput();
Does it make a difference to the reference count of the vtkSmartPointer?
Thank you very much in advance.
Cheers,
Berti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181024/0f77e085/attachment.html>
More information about the vtkusers
mailing list