From: ptv Date: Mon, 1 Nov 2010 10:07:17 +0000 (+0000) Subject: remove memory leak in script X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5ba9e5dffc8656bf2299d0a0b93899698a3ae35b;p=modules%2Fsmesh.git remove memory leak in script --- diff --git a/src/SMESH_SWIG/SMESH_BelongToGeom.py b/src/SMESH_SWIG/SMESH_BelongToGeom.py index 02047a1cf..af6c98420 100644 --- a/src/SMESH_SWIG/SMESH_BelongToGeom.py +++ b/src/SMESH_SWIG/SMESH_BelongToGeom.py @@ -40,6 +40,7 @@ def CheckBelongToGeomFilterOld(theMeshGen, theMesh, theShape, theSubShape, theEl aBelongToGeom.SetElementType(theElemType) aFilter.SetPredicate(aBelongToGeom) + aFilterMgr.Destroy() return aFilter.GetElementsId(theMesh) ## Current style diff --git a/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py b/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py index e0cbb6404..c90a3bd89 100644 --- a/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py +++ b/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py @@ -36,6 +36,7 @@ def BuildGroupLyingOn(theMesh, theElemType, theName, theShape): aFilter.SetPredicate(aLyingOnGeom) anIds = aFilter.GetElementsId(theMesh) + aFilterMgr.Destroy() aGroup = theMesh.CreateGroup(theElemType, theName) aGroup.Add(anIds)