Fix memory leaks: another attempt

This commit is contained in:
vsr 2013-09-13 06:58:16 +00:00
parent 7b4622715b
commit 535d13a0f8

View File

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