]> Creatis software - creaMaracasVisu.git/commitdiff
some memory leaks
authorFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Fri, 29 Oct 2010 07:51:06 +0000 (07:51 +0000)
committerFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Fri, 29 Oct 2010 07:51:06 +0000 (07:51 +0000)
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h

index 25f66eddeb88da0fa22d32ecd32bef63ebafed70..ef27a33229152953e15a6d5105719190b90a98a8 100644 (file)
@@ -24,9 +24,9 @@ vtkMPR3DDataViewer::vtkMPR3DDataViewer()
 //-------------------------------------------------------------------
 vtkMPR3DDataViewer::~vtkMPR3DDataViewer()
 {
-       _outlineData-> Delete();
-       _mapOutline-> Delete();
-       _outline-> Delete();
+       if(_outlineData) {_outlineData-> Delete();}
+       if(_mapOutline)  {_mapOutline-> Delete();}
+       if(_outline)     {_outline-> Delete();}
 
 //     if (_bwLut)             _bwLut->Delete();
 //     if (_hueLut)            _hueLut->Delete();
index ead3f1f13cdc3924f263ae224bec4393cb2c2d10..588a0dee2583ccd019abe86d182e1b9ea3828582 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/10/29 06:32:50 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2010/10/29 07:51:06 $
+  Version:   $Revision: 1.33 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -23,7 +23,6 @@
 //------------------------------------------------------------------------------------------------------------
 // Other includes
 //------------------------------------------------------------------------------------------------------------
-
        //------------------------------------------------------------------------------------------------------------
        // Constructors & Destructors
        //------------------------------------------------------------------------------------------------------------
                {
                   if (mvtkmprbasedata)         { delete mvtkmprbasedata;}
                }
-
+               
                if (mvtk2Dbaseview)             { delete mvtk2Dbaseview; }
                if (mvtkmpr2Dview_X)            { delete mvtkmpr2Dview_X;}
                if (mvtkmpr2Dview_Y)            { delete mvtkmpr2Dview_Y;}
                if (mwxvtkmpr3Dview)            { delete mwxvtkmpr3Dview;}
                if (mwxvtkclipping3Dview)       { delete mwxvtkclipping3Dview;}
                if (mwxvtk3Dbaseview_Clipping3D){ delete mwxvtk3Dbaseview_Clipping3D; mwxvtk3Dbaseview_Clipping3D=NULL;}
+               if (vtkmpr3Ddataviewer)                 { delete vtkmpr3Ddataviewer;}
        }
        //------------------------------------------------------------------------------------------------------------
        // Methods
index 9a076912affd94e84cce2890096208f559fef560..57b9ccf9983213617518cc418f8b90caef93106f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.h,v $
   Language:  C++
-  Date:      $Date: 2010/01/21 13:54:15 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2010/10/29 07:51:06 $
+  Version:   $Revision: 1.10 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -46,7 +46,6 @@
 // Class definition
 //------------------------------------------------------------------------------------------------------------
 
-
  class wxMaracas_ViewerWidget : public wxPanel
   {
   public: