mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
fix memory leaks
This commit is contained in:
parent
73708660ab
commit
12ab3d7cce
@ -287,10 +287,12 @@ namespace netgen
|
|||||||
PrintMessage (1, "Save mesh to file ", filename, ".... Please Wait!");
|
PrintMessage (1, "Save mesh to file ", filename, ".... Please Wait!");
|
||||||
|
|
||||||
ofstream outfile(filename.c_str());
|
ofstream outfile(filename.c_str());
|
||||||
|
//ogzstream outfile( (filename+".gz").c_str());
|
||||||
mesh -> Save (outfile);
|
mesh -> Save (outfile);
|
||||||
|
|
||||||
outfile << endl << endl << "endmesh" << endl << endl;
|
outfile << endl << endl << "endmesh" << endl << endl;
|
||||||
|
|
||||||
|
if (ng_geometry)
|
||||||
ng_geometry -> SaveToMeshFile (outfile);
|
ng_geometry -> SaveToMeshFile (outfile);
|
||||||
/*
|
/*
|
||||||
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry);
|
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <stlgeom.hpp>
|
#include <stlgeom.hpp>
|
||||||
#include <geometry2d.hpp>
|
#include <geometry2d.hpp>
|
||||||
#include <meshing.hpp>
|
#include <meshing.hpp>
|
||||||
|
#include <../visualization/soldata.hpp>
|
||||||
|
|
||||||
#ifdef OCCGEOMETRY
|
#ifdef OCCGEOMETRY
|
||||||
#include <occgeom.hpp>
|
#include <occgeom.hpp>
|
||||||
@ -1226,7 +1227,10 @@ namespace netgen
|
|||||||
|
|
||||||
void Ng_Redraw () { ; }
|
void Ng_Redraw () { ; }
|
||||||
void Ng_ClearSolutionData () { ; }
|
void Ng_ClearSolutionData () { ; }
|
||||||
void Ng_SetSolutionData (Ng_SolutionData * soldata) { ; }
|
void Ng_SetSolutionData (Ng_SolutionData * soldata)
|
||||||
|
{
|
||||||
|
delete soldata->solclass;
|
||||||
|
}
|
||||||
void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; }
|
void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,4 +53,3 @@ solid brickandring = mytorus or bbb;
|
|||||||
|
|
||||||
tlo brickandring;
|
tlo brickandring;
|
||||||
|
|
||||||
point (-3.8, 3.8, 0.1);
|
|
Loading…
Reference in New Issue
Block a user