]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHUtils/SMESH_Tree.hxx
Salome HOME
22355: EDF SMESH: New 1D hypothesis "Adaptive"
[modules/smesh.git] / src / SMESHUtils / SMESH_Tree.hxx
index 61ee057f0975f7c7f9dbde090cc1551330691b51..13c70c728191c10508cb446b842c757e756c7b9a 100644 (file)
@@ -115,14 +115,15 @@ protected:
   // Tree limit
   const SMESH_TreeLimit* myLimit;
 
+  // Bounding box of a tree
+  box_type*      myBox;
+
 private:
   // Build the children recursively
   void                   buildChildren();
 
   // Level of the Tree
   int            myLevel;
-
-  box_type*      myBox;
 };
 
 //===========================================================================
@@ -219,6 +220,8 @@ void SMESH_Tree<BND_BOX,NB_CHILDREN>::buildChildren()
     myChildren[i] = newChild();
     // and we assign to him its box.
     myChildren[i]->myFather = this;
+    if (myChildren[i]->myLimit)
+      delete myChildren[i]->myLimit;
     myChildren[i]->myLimit = myLimit;
     myChildren[i]->myLevel = myLevel + 1;
     myChildren[i]->myBox = newChildBox( i );