From 44248b7929b66a77e634983e26aef5da460482db Mon Sep 17 00:00:00 2001 From: Yoann Audouin Date: Thu, 15 Sep 2022 11:00:41 +0200 Subject: [PATCH] Mesh object not deleted in Python + deleting temporary folder when destructing SMESH_Mesh --- src/SMESH/SMESH_Mesh.cxx | 3 +++ src/SMESH_SWIG/smeshBuilder.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index d3fe63eb6..6690f0377 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -240,6 +240,9 @@ SMESH_Mesh::~SMESH_Mesh() pthread_t thread; int result=pthread_create(&thread, NULL, deleteMeshDS, (void*)_meshDS); #endif + + fs::remove_all(tmp_folder); + } } diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 74b1f6735..1b4ddd4f3 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1621,7 +1621,7 @@ class Mesh(metaclass = MeshMeta): Destructor. Clean-up resources """ if self.mesh: - #self.mesh.UnRegister() + self.mesh.UnRegister() pass pass -- 2.39.2