From e0859e6a658e844cc966ed3e4ef22745f0415869 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 5ca9919ac..a7bd39126 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 3fad0860b..25a947352 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1642,7 +1642,7 @@ class Mesh(metaclass = MeshMeta): Destructor. Clean-up resources """ if self.mesh: - #self.mesh.UnRegister() + self.mesh.UnRegister() pass pass -- 2.39.2