[vtkusers] How to release the memeory of props?
Helend
zheng.bangyou at yahoo.com.cn
Tue Apr 14 19:53:11 EDT 2009
this problem has solved by updating VTK to cvs version
Helend wrote:
>
> I need to redraw the vtkRenderer when users click the some place of
> window. Firstly, the all props were deleted:
> m_Renderer->RemoveAllViewProps();
>
> Then, these codes were used to redraw the vtkRenderer
>
> vtkPoints * pts = vtkPoints::New();
> vtkUnstructuredGrid * aTriangleGrid = vtkUnstructuredGrid::New();
> vtkDataSetMapper * aTriangleMapper = vtkDataSetMapper::New();
> vtkActor * Actor = vtkActor::New();
>
> // some codes to create the Props
>
> m_Renderer->AddViewProp( Actor );
>
> pts->Delete();
> aTriangleGrid->Delete();
> aTriangleMapper->Delete();
> Actor->Delete();
>
> The memory was growing with redrawing the vtkRenderer
>
> I had tried "vtkSmartPointer", but the problem still existed.
>
> How to fix this problem?
> Thank you very much!
>
--
View this message in context: http://www.nabble.com/How-to-release-the-memeory-of-props--tp23011060p23050149.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list