mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
22261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs
Pb: myLimit leaks if it was not provided at construction
This commit is contained in:
parent
8fe58da2fc
commit
e11c322ee9
@ -85,7 +85,7 @@ class SMESH_Tree
|
||||
|
||||
static int nbChildren() { return NB_CHILDREN; }
|
||||
|
||||
// Compute the bigger dimension of my box
|
||||
// Compute the biggest dimension of my box
|
||||
virtual double maxSize() const = 0;
|
||||
|
||||
protected:
|
||||
@ -141,7 +141,7 @@ SMESH_Tree<BND_BOX,NB_CHILDREN>::SMESH_Tree (SMESH_TreeLimit* limit):
|
||||
myLevel(0),
|
||||
myBox(0)
|
||||
{
|
||||
if ( !myLimit ) myLimit = new SMESH_TreeLimit();
|
||||
//if ( !myLimit ) myLimit = new SMESH_TreeLimit();
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
@ -155,6 +155,7 @@ void SMESH_Tree<BND_BOX,NB_CHILDREN>::compute()
|
||||
{
|
||||
if ( myLevel==0 )
|
||||
{
|
||||
if ( !myLimit ) myLimit = new SMESH_TreeLimit();
|
||||
myBox = buildRootBox();
|
||||
if ( myLimit->myMinBoxSize > 0. && maxSize() <= myLimit->myMinBoxSize )
|
||||
myIsLeaf = true;
|
||||
|
Loading…
Reference in New Issue
Block a user