mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
reset global mesh-pointer at deletion of ngx-mesh
This commit is contained in:
parent
38ffe628b1
commit
97904a113c
@ -25,8 +25,6 @@ namespace netgen
|
||||
shared_ptr<Mesh> hmesh = netgen::mesh;
|
||||
|
||||
netgen::mesh = mesh;
|
||||
// vssolution.SetMesh(mesh);
|
||||
// vsmesh.SetMesh(mesh);
|
||||
SetGlobalMesh (mesh);
|
||||
|
||||
return hmesh;
|
||||
@ -60,8 +58,6 @@ namespace netgen
|
||||
netgen::mesh = make_shared<Mesh>();
|
||||
netgen::mesh -> Load (ist);
|
||||
mesh = netgen::mesh;
|
||||
// vssolution.SetMesh(mesh);
|
||||
// vsmesh.SetMesh(mesh);
|
||||
SetGlobalMesh (mesh);
|
||||
}
|
||||
|
||||
@ -104,12 +100,8 @@ namespace netgen
|
||||
|
||||
Ngx_Mesh :: ~Ngx_Mesh ()
|
||||
{
|
||||
;
|
||||
/*
|
||||
if (netgen::mesh.Ptr() == mesh)
|
||||
netgen::mesh.Ptr() = NULL;
|
||||
delete mesh;
|
||||
*/
|
||||
if (mesh == netgen::mesh)
|
||||
netgen::mesh = nullptr;
|
||||
}
|
||||
|
||||
int Ngx_Mesh :: GetDimension() const
|
||||
|
Loading…
Reference in New Issue
Block a user