From: eap Date: Wed, 26 Jan 2011 14:09:38 +0000 (+0000) Subject: Clear data structures at Compute() finish X-Git-Tag: StartingPortingMED3~114 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6cf8eec1823ce62c9f061ef2fb05db6ee1cbc929;p=modules%2Fsmesh.git Clear data structures at Compute() finish --- diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 90c68771b..0493e6c1b 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -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(); } //================================================================================ diff --git a/src/StdMeshers/StdMeshers_Prism_3D.hxx b/src/StdMeshers/StdMeshers_Prism_3D.hxx index d7278e813..a688333ce 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.hxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.hxx @@ -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