[vtkusers] vtkTubeFilter memory leak problem.....................help help help
kannan
ksoft44 at hotmail.com
Sat Mar 15 00:24:57 EST 2003
Dear vtk users,
Hello All,
I am using vtk for displaying a bended tube in MFC window.
I am using VtkTubeFilter. It works well but it contains a large amount of memory leaks.
My observation is that the most of the leak is happening when i call vtktubefilter->update().
am doing all this things in a loop so memory leak is very bad problem. I hope someone can help me
regards
Kannan
part of my code...
vtkpoints m_pts;
vtkcellarray m_lines
vtkPolydata m_curve, m_pvtkPolydata
vtkTubeFilter m_pvtkTubeFilter
vtkPoints points
m_pts->Initialize();
m_lines->Initialize();
m_curve->Initialize();
for(int nCount=0;nCount<nCountOfPoints;nCount++)
{
m_pts->InsertNextPoint(tempPipePts.fXvalue,tempPipePts.fYvalue,tempPipePts.fZvalue);
}
m_lines->InsertNextCell(m_pts->GetNumberOfPoints());
for(nCount=0;nCount<m_pts->GetNumberOfPoints();nCount++)
{
m_lines->InsertCellPoint(nCount);
}
m_curve->SetPoints(m_pts);
m_curve->SetLines(m_lines);
m_pVtkTubeFilter->SetInput(m_curve);
m_pVtkTubeFilter->SetNumberOfSides(NO_OF_SIDES);
m_pVtkTubeFilter->SetRadius(m_fPipeRadius);
m_pVtkTubeFilter->Update();
m_pVtkPolyData=g_pCNCHandler->m_pSimHandler->m_pVtkTubeFilter->GetOutput();
points=g_pCNCHandler->m_pSimHandler->m_pVtkPolyData->GetPoints();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030315/a626e72e/attachment.htm>
More information about the vtkusers
mailing list