fix memory leaks

This commit is contained in:
Joachim Schoeberl 2013-02-26 13:11:39 +00:00
parent 73708660ab
commit 12ab3d7cce
3 changed files with 8 additions and 3 deletions

View File

@ -287,10 +287,12 @@ namespace netgen
PrintMessage (1, "Save mesh to file ", filename, ".... Please Wait!");
ofstream outfile(filename.c_str());
//ogzstream outfile( (filename+".gz").c_str());
mesh -> Save (outfile);
outfile << endl << endl << "endmesh" << endl << endl;
if (ng_geometry)
ng_geometry -> SaveToMeshFile (outfile);
/*
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry);

View File

@ -17,6 +17,7 @@
#include <stlgeom.hpp>
#include <geometry2d.hpp>
#include <meshing.hpp>
#include <../visualization/soldata.hpp>
#ifdef OCCGEOMETRY
#include <occgeom.hpp>
@ -1226,7 +1227,10 @@ namespace netgen
void Ng_Redraw () { ; }
void Ng_ClearSolutionData () { ; }
void Ng_SetSolutionData (Ng_SolutionData * soldata) { ; }
void Ng_SetSolutionData (Ng_SolutionData * soldata)
{
delete soldata->solclass;
}
void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; }

View File

@ -53,4 +53,3 @@ solid brickandring = mytorus or bbb;
tlo brickandring;
point (-3.8, 3.8, 0.1);