Clear data structures at Compute() finish

This commit is contained in:
eap 2011-01-26 14:09:38 +00:00
parent 0df1e71b77
commit 6cf8eec182
2 changed files with 19 additions and 0 deletions

View File

@ -555,6 +555,10 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
AddPrisms( columns, myHelper );
} // loop on bottom mesh faces
// clear data
myBotToColumnMap.clear();
myBlock.Clear();
return true;
}
@ -1045,9 +1049,19 @@ StdMeshers_PrismAsBlock::StdMeshers_PrismAsBlock()
StdMeshers_PrismAsBlock::~StdMeshers_PrismAsBlock()
{
Clear();
}
void StdMeshers_PrismAsBlock::Clear()
{
myHelper = 0;
myShapeIDMap.Clear();
myError.reset();
if ( mySide ) {
delete mySide; mySide = 0;
}
myParam2ColumnMaps.clear();
myShapeIndex2ColumnMap.clear();
}
//================================================================================

View File

@ -124,6 +124,11 @@ public:
*/
SMESH_ComputeErrorPtr GetError() const { return myError; }
/*!
* \brief Free allocated memory
*/
void Clear();
/*!
* \brief Return number of nodes on every vertical edge
* \retval int - number of nodes including end nodes