diff --git a/AMDiS/src/Mesh.cc b/AMDiS/src/Mesh.cc index 6e307db03b8255f9ee671536ffc9354573314875..617524e325841aa4f470b94b8cbc7b0d6edc9616 100644 --- a/AMDiS/src/Mesh.cc +++ b/AMDiS/src/Mesh.cc @@ -138,10 +138,7 @@ namespace AMDiS { if (elementPrototype) delete elementPrototype; if (elementDataPrototype) - delete elementDataPrototype; - - for (unsigned int i = 0; i < admin.size(); i++) - delete admin[i]; + delete elementDataPrototype; } diff --git a/AMDiS/src/ProblemStat.cc b/AMDiS/src/ProblemStat.cc index f3cd56683472f47358e19ad0f91e0d1a5e88d738..33b430718ba7dd50994c07c4ede3ac22973b5d8e 100644 --- a/AMDiS/src/ProblemStat.cc +++ b/AMDiS/src/ProblemStat.cc @@ -122,16 +122,22 @@ namespace AMDiS { } for (unsigned int i = 0; i < meshes.size(); i++) - if (meshes[i]) - delete meshes[i]; + if (meshes[i]) { +// delete meshes[i]; +// meshes[i] = NULL; + } for (unsigned int i = 0; i < estimator.size(); i++) - if (estimator[i]) + if (estimator[i]) { delete estimator[i]; + estimator[i] = NULL; + } for (unsigned int i = 0; i < marker.size(); i++) - if (marker[i]) + if (marker[i]) { delete marker[i]; + marker[i] = NULL; + } }