From 5ba9e5dffc8656bf2299d0a0b93899698a3ae35b Mon Sep 17 00:00:00 2001 From: ptv Date: Mon, 1 Nov 2010 10:07:17 +0000 Subject: [PATCH] remove memory leak in script --- src/SMESH_SWIG/SMESH_BelongToGeom.py | 1 + src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py | 1 + 2 files changed, 2 insertions(+) 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) -- 2.39.2