]> 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>
Wed, 28 Sep 2022 06:17:53 +0000 (08:17 +0200)
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
src/NETGENPlugin/NETGENPlugin_Runner.cxx

index 367c4192378a116cc3722d976dbc33af06bb18db..347f4c3888296292d0064852d11b4460d36cf587 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";