Salome HOME
Fix for bug IPAL19437.
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.cxx
index 7a6256462247a08395ac5b36d7b2173414d0da96..a52c3b0c2cef3fe7d61804767797881e9f545ba3 100644 (file)
@@ -117,15 +117,14 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
   for ( it = _mapGroups.begin(); it != _mapGroups.end(); it++ ) {
     SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>( SMESH_Gen_i::GetServant( it->second ).in() );
     if ( aGroup ) {
-
       // this method is colled from destructor of group (PAL6331)
       //_impl->RemoveGroup( aGroup->GetLocalID() );
-
-      removeGroup( aGroup->GetLocalID() );
+      
       aGroup->Destroy();
     }
   }
   _mapGroups.clear();
+  delete _impl;
 }
 
 //=============================================================================