fixing mem-leak

This commit is contained in:
Joachim Schoeberl 2013-02-06 12:55:47 +00:00
parent 60843c9bf0
commit 3c150dfa73
2 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,10 @@ namespace netgen
layer = 1; layer = 1;
} }
~SplineSegExt ()
{
delete &seg;
}
virtual const GeomPoint<2> & StartPI () const virtual const GeomPoint<2> & StartPI () const
{ {

View File

@ -109,7 +109,7 @@ namespace netgen
// global variable mesh (should not be used in libraries) // global variable mesh (should not be used in libraries)
AutoPtr<Mesh> mesh; AutoPtr<Mesh> mesh;
NetgenGeometry * ng_geometry = new NetgenGeometry; NetgenGeometry * ng_geometry = NULL; // new NetgenGeometry;
// extern NetgenGeometry * ng_geometry; // extern NetgenGeometry * ng_geometry;
// extern AutoPtr<Mesh> mesh; // extern AutoPtr<Mesh> mesh;