]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
delete all modules at application destructor
authorptv <ptv@opencascade.com>
Mon, 30 Oct 2006 07:29:23 +0000 (07:29 +0000)
committerptv <ptv@opencascade.com>
Mon, 30 Oct 2006 07:29:23 +0000 (07:29 +0000)
src/CAM/CAM_Application.cxx

index baabb3970951a607f044d2959d9cc43957ecbc75..1c71b6ed1c14f78c1d56708a5105e0ab5a183bfb 100755 (executable)
@@ -59,6 +59,10 @@ myAutoLoad( autoLoad )
 /*!Destructor. Do nothing.*/
 CAM_Application::~CAM_Application()
 {
+  // delete all modules (or switch on autoDelete property of QPtrList in constructor )
+  for ( ModuleListIterator it( myModules ); it.current(); ++it )
+    delete it.current();
+  myModules.clear();
 }
 
 /*! Load modules, if \a myAutoLoad flag is true.\n