View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000827VTK(No Category)public2004-05-10 13:352004-05-10 13:52
ReporterMathieu Malaterre 
Assigned ToMathieu Malaterre 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000827: Mem leak in vtkAbstractMapper::SetClippingPlanes
DescriptionAnother cleanup I've found and maybe resolved for the community is in \Common\vtkAbstractMapper.cxx

void vtkAbstractMapper::SetClippingPlanes(vtkPlanes *planes)
{
 vtkPlane *plane;
 if (!planes)
   {
   return;
   }

 int numPlanes = planes->GetNumberOfPlanes();

 this->RemoveAllClippingPlanes();
 for (int i=0; i<numPlanes && i<6; i++)
   {
   plane = planes->GetPlane(i);
   this->AddClippingPlane(plane);
   plane->Delete(); // <-- Added
   }
}
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0001029)
Mathieu Malaterre (developer)
2004-05-10 13:36

Make the change in vtkPlanes instead:

Index: vtkPlanes.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/vtkPlanes.cxx,v
retrieving revision 1.12
diff -u -3 -p -r1.12 vtkPlanes.cxx
--- vtkPlanes.cxx 5 Dec 2003 18:18:41 -0000 1.12
+++ vtkPlanes.cxx 10 May 2004 15:26:13 -0000
@@ -313,12 +313,11 @@ vtkPlane *vtkPlanes::GetPlane(int i)
    
   if ( i >= 0 && i < this->GetNumberOfPlanes() )
     {
- vtkPlane *plane = vtkPlane::New();
     this->Normals->GetTuple(i,normal);
     this->Points->GetPoint(i,point);
- plane->SetNormal(normal);
- plane->SetOrigin(point);
- return plane;
+ this->Plane->SetNormal(normal);
+ this->Plane->SetOrigin(point);
+ return this->Plane;
     }
   else
     {
(0001030)
Mathieu Malaterre (developer)
2004-05-10 13:52

Fixed in CVS.

Checking in vtkPlanes.cxx;
/cvsroot/VTK/VTK/Common/vtkPlanes.cxx,v <-- vtkPlanes.cxx
new revision: 1.13; previous revision: 1.12
done

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team