Salome HOME
Fix memory leaks: another attempt
authorvsr <vsr@opencascade.com>
Fri, 13 Sep 2013 06:58:16 +0000 (06:58 +0000)
committervsr <vsr@opencascade.com>
Fri, 13 Sep 2013 06:58:16 +0000 (06:58 +0000)
src/SMESH_SWIG/smeshBuilder.py

index 994e3f1..d2e6419 100644 (file)
@@ -1181,7 +1181,7 @@ class Mesh:
             elif isinstance(obj, SMESH._objref_SMESH_Mesh):
                 self.SetMesh(obj)
         else:
-            self.mesh = self.smeshpyD.CreateEmptyMesh()
+            self.SetMesh( self.smeshpyD.CreateEmptyMesh() )
         if name:
             self.smeshpyD.SetName(self.mesh, name)
         elif objHasName:
@@ -1219,6 +1219,7 @@ class Mesh:
         if self.mesh:
             self.mesh.Register()
             self.geom = self.mesh.GetShapeToMesh()
+        pass
 
     ## Returns the mesh, that is an instance of SMESH_Mesh interface
     #  @return a SMESH_Mesh object