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)