]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Clear data structures at Compute() finish
authoreap <eap@opencascade.com>
Wed, 26 Jan 2011 14:09:38 +0000 (14:09 +0000)
committereap <eap@opencascade.com>
Wed, 26 Jan 2011 14:09:38 +0000 (14:09 +0000)
src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_Prism_3D.hxx

index 90c68771b2f0f737d30556c20e32268d1975fbf5..0493e6c1b3c051bd9aceb5eb208a6448e2a6710d 100644 (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();
 }
 
 //================================================================================
index d7278e813a5dc2ec590ba555f30e80d4b5f5e043..a688333ced8b07c06f720783acfe51ce8fb2d9c7 100644 (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