mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-05 06:10:33 +05:00
PAL16774 (Crash after display of many groups)
implement destructor to free memory at closing a study
This commit is contained in:
parent
1949fa0f3e
commit
c9328ea212
@ -39,6 +39,18 @@ SMESHDS_Document::SMESHDS_Document(int UserID):myUserID(UserID)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Destructor
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMESHDS_Document::~SMESHDS_Document()
|
||||||
|
{
|
||||||
|
InitMeshesIterator();
|
||||||
|
while ( MoreMesh() )
|
||||||
|
delete NextMesh();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewMesh
|
//function : NewMesh
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -1220,13 +1220,21 @@ void SMESHDS_Mesh::SetMeshElementOnShape(const SMDS_MeshElement* anElement,
|
|||||||
add( anElement, getSubmesh( Index ));
|
add( anElement, getSubmesh( Index ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : ~SMESHDS_Mesh
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
SMESHDS_Mesh::~SMESHDS_Mesh()
|
SMESHDS_Mesh::~SMESHDS_Mesh()
|
||||||
{
|
{
|
||||||
|
// myScript
|
||||||
delete myScript;
|
delete myScript;
|
||||||
|
// submeshes
|
||||||
|
TShapeIndexToSubMesh::iterator i_sm = myShapeIndexToSubMesh.begin();
|
||||||
|
for ( ; i_sm != myShapeIndexToSubMesh.end(); ++i_sm )
|
||||||
|
delete i_sm->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************
|
//********************************************************************
|
||||||
//********************************************************************
|
//********************************************************************
|
||||||
//******** *********
|
//******** *********
|
||||||
|
Loading…
Reference in New Issue
Block a user