]> Creatis software - clitk.git/commitdiff
Correct destructor
authordsarrut <dsarrut>
Thu, 10 Mar 2011 15:57:09 +0000 (15:57 +0000)
committerdsarrut <dsarrut>
Thu, 10 Mar 2011 15:57:09 +0000 (15:57 +0000)
vv/vvROIActor.cxx

index 253a2901ab3e0ba030bab1ac8ab0be382bf3fae8..582b0782520be38a468adcf393ed2f7514dd34d4 100644 (file)
@@ -51,6 +51,8 @@ vvROIActor::vvROIActor()
 //------------------------------------------------------------------------------
 vvROIActor::~vvROIActor()
 {
+  for(uint i= 0; i<mImageContour.size(); i++) delete mImageContour[i];
+  for(uint i= 0; i<mOverlayActors.size(); i++) delete mOverlayActors[i];
 }
 //------------------------------------------------------------------------------
 
@@ -148,6 +150,7 @@ void vvROIActor::Initialize(bool IsVisible) {
     mImageContour.clear();
     mOverlayActors.clear();
     for(int i=0; i<mSlicerManager->GetNumberOfSlicers(); i++) {
+
       mImageContour.push_back(new vvImageContour);
       mImageContour[i]->SetSlicer(mSlicerManager->GetSlicer(i));
       mImageContour[i]->SetImage(mROI->GetImage());