]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
Better handle of deletion of temporary folder + missing delete of temporary SMESH_Mesh
authorYoann Audouin <yoann.audouin@edf.fr>
Thu, 15 Sep 2022 09:01:41 +0000 (11:01 +0200)
committerYoann Audouin <yoann.audouin@edf.fr>
Thu, 15 Sep 2022 09:01:41 +0000 (11:01 +0200)
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
src/NETGENPlugin/NETGENPlugin_Runner.cxx

index f08232e0ee7b37f00b649d2ef1f67ee0a705d952..7fb861b62a5705489517144b590e6c6d15e77ed1 100644 (file)
@@ -441,7 +441,6 @@ int NETGENPlugin_NETGEN_3D::RemoteCompute(SMESH_Mesh&         aMesh,
   elapsed = std::chrono::duration_cast<std::chrono::nanoseconds>(time7-time5);
   std::cout << "Time for exec of add_in_mesh: " << elapsed.count() * 1e-9 << std::endl;
 
-  fs::remove_all(tmp_folder);
   aMesh.Unlock();
 
   return true;
index e69dcd57f2dd17140df0fc7fb390637fdff06ee5..a9b2a00dd524d294dd0192bb7402f74141d9ea72 100644 (file)
@@ -194,7 +194,7 @@ int netgen3d(const std::string input_mesh_file,
   // Importing mesh
   SMESH_Gen gen;
 
-  SMESH_Mesh *myMesh = gen.CreateMesh(false);
+  std::unique_ptr<SMESH_Mesh> myMesh(gen.CreateMesh(false));
   //TODO: To define
   std::string mesh_name = "Maillage_1";
 
@@ -657,7 +657,8 @@ int netgen2d(const std::string input_mesh_file,
   // Importing mesh
   SMESH_Gen gen;
 
-  SMESH_Mesh *myMesh = gen.CreateMesh(false);
+  std::unique_ptr<SMESH_Mesh> myMesh(gen.CreateMesh(false));
+
   //TODO: To define
   std::string mesh_name = "Maillage_1";