Better handle of deletion of temporary folder + missing delete of temporary SMESH_Mesh

This commit is contained in:
Yoann Audouin 2022-09-15 11:01:41 +02:00
parent 01afecee31
commit 75a1472981
2 changed files with 3 additions and 3 deletions

View File

@ -441,7 +441,6 @@ int NETGENPlugin_NETGEN_3D::RemoteCompute(SMESH_Mesh& aMesh,
elapsed = std::chrono::duration_cast<std::chrono::nanoseconds>(time7-time5); 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; std::cout << "Time for exec of add_in_mesh: " << elapsed.count() * 1e-9 << std::endl;
fs::remove_all(tmp_folder);
aMesh.Unlock(); aMesh.Unlock();
return true; return true;

View File

@ -194,7 +194,7 @@ int netgen3d(const std::string input_mesh_file,
// Importing mesh // Importing mesh
SMESH_Gen gen; SMESH_Gen gen;
SMESH_Mesh *myMesh = gen.CreateMesh(false); std::unique_ptr<SMESH_Mesh> myMesh(gen.CreateMesh(false));
//TODO: To define //TODO: To define
std::string mesh_name = "Maillage_1"; std::string mesh_name = "Maillage_1";
@ -657,7 +657,8 @@ int netgen2d(const std::string input_mesh_file,
// Importing mesh // Importing mesh
SMESH_Gen gen; SMESH_Gen gen;
SMESH_Mesh *myMesh = gen.CreateMesh(false); std::unique_ptr<SMESH_Mesh> myMesh(gen.CreateMesh(false));
//TODO: To define //TODO: To define
std::string mesh_name = "Maillage_1"; std::string mesh_name = "Maillage_1";