}
// delete SMESH_Mesh's
- StudyContextStruct* context = myGen.GetStudyContext( studyId );
- map< int, SMESH_Mesh* >::iterator i_mesh = context->mapMesh.begin();
- for ( ; i_mesh != context->mapMesh.end(); ++i_mesh )
- delete i_mesh->second;
+// See bug IPAL19437.
+//
+// StudyContextStruct* context = myGen.GetStudyContext( studyId );
+// map< int, SMESH_Mesh* >::iterator i_mesh = context->mapMesh.begin();
+// for ( ; i_mesh != context->mapMesh.end(); ++i_mesh ) {
+// printf( "--------------------------- SMESH_Gen_i::Close, delete aGroup = %p \n", i_mesh->second );
+// delete i_mesh->second;
+// }
+
+
// delete SMESHDS_Mesh's
// it's too long on big meshes
// if ( context->myDocument ) {
SMESH_GroupBase_i::~SMESH_GroupBase_i()
{
MESSAGE("~SMESH_GroupBase_i; this = "<<this );
- // akl: removeGroup() is called from SMESH_Mesh_i() destructor
- // if ( myMeshServant )
- // myMeshServant->removeGroup(myLocalID);
+ if ( myMeshServant )
+ myMeshServant->removeGroup(myLocalID);
}
//=======================================================================
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;
}
//=============================================================================