[vtkusers] Reference counting
Amy Squillacote
amy.squillacote at kitware.com
Fri Mar 31 14:50:46 EST 2006
In what version of VTK do you see this behavior?
- Amy
At 02:36 PM 3/31/2006, lzagorch at verizon.net wrote:
>I noticed that when I set a polydata object as input to a mapper
>(the code below) the polydata's reference count jumps from 1 to 3.
>Can someone explain why? Shouldn't it be 2 instead of 3?
>
>Thank you,
>
>Lyubomir
>
>
> vtkPolyData *p3dData = vtkPolyData::New();
> p3dData->SetPoints(p3d);
> p3dData->SetVerts(cells);
> p3d->Delete();
> cells->Delete();
>
>p3dData's reference count = 1
>
> vtkPolyDataMapper *p3dMapper =
> vtkPolyDataMapper::New(); p3dMapper->SetInput(p3dData);
>
>p3dData's reference count = 3
>
> p3dData->Delete();
>
>p3dData's reference count = 2
>
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list