diff --git a/libsrc/meshing/curvedelems.cpp b/libsrc/meshing/curvedelems.cpp index ef34ce5e..5e02fbfe 100644 --- a/libsrc/meshing/curvedelems.cpp +++ b/libsrc/meshing/curvedelems.cpp @@ -337,7 +337,7 @@ namespace netgen } - static Array jacpols2; + static Array> jacpols2; // compute face bubbles up to order n, 0 < y, y-x < 1, x+y < 1 @@ -451,8 +451,6 @@ namespace netgen CurvedElements :: ~CurvedElements() { - for (int i = 0; i < jacpols2.Size(); i++) - delete jacpols2[i]; jacpols2.SetSize(0); } @@ -631,7 +629,7 @@ namespace netgen { jacpols2.SetSize (100); for (int i = 0; i < 100; i++) - jacpols2[i] = new JacobiRecPol (100, i, 2); + jacpols2[i] = make_shared (100, i, 2); } PrintMessage (3, "Curving edges");