]> Creatis software - clitk.git/commitdiff
Removed memory leak
authorsrit <srit>
Mon, 30 Aug 2010 13:42:52 +0000 (13:42 +0000)
committersrit <srit>
Mon, 30 Aug 2010 13:42:52 +0000 (13:42 +0000)
common/vvImage.cxx

index 066aaada7d0aa80d4d5281628820217bc414b392..53346a3ba7f0ceeadb208f6432715cb99f42a861 100644 (file)
@@ -58,8 +58,10 @@ vvImage::~vvImage()
 //--------------------------------------------------------------------
 void vvImage::Reset()
 {
-  for (unsigned int i = 0; i < mVtkImages.size(); i++)
+  for (unsigned int i = 0; i < mVtkImages.size(); i++) {  
     mVtkImageReslice[i]->GetInput()->Delete();
+    mVtkImageReslice[i]->Delete();
+  }
 
   mVtkImages.resize(0);
   mVtkImageReslice.resize(0);