Fix for several memory leaks in fluidsim (found with Valgrind).

This commit is contained in:
Daniel Genrich 2008-07-11 18:08:25 +00:00
parent c83e32fc33
commit b369936b11
5 changed files with 13 additions and 3 deletions

@ -37,6 +37,7 @@ class ntlGeometryClass
//! Default destructor
virtual ~ntlGeometryClass() {
delete mpAttrs;
delete mpSwsAttrs;
};
//! Return type id

@ -20,6 +20,7 @@ class ntlRay;
class ntlTree;
class ntlScene;
class ntlRenderGlobals;
class ntlGeometryObject;
//! store data for an intersection of a ray and a triangle
// NOT YET USED

@ -59,6 +59,7 @@ SimulationObject::~SimulationObject()
if(mpElbeemSettings) delete mpElbeemSettings;
if(mpLbm) delete mpLbm;
if(mpParam) delete mpParam;
if(mpParts) delete mpParts;
debMsgStd("SimulationObject",DM_MSG,"El'Beem Done!\n",10);
}

@ -63,6 +63,9 @@ LbmControlData::LbmControlData() :
LbmControlData::~LbmControlData()
{
while (!mCons.empty()) {
delete mCons.back(); mCons.pop_back();
}
}

@ -442,6 +442,10 @@ LbmFsgrSolver::~LbmFsgrSolver()
if(mpPreviewSurface) delete mpPreviewSurface;
// cleanup done during scene deletion...
#if LBM_INCLUDE_CONTROL==1
if(mpControl) delete mpControl;
#endif
// always output performance estimate
debMsgStd("LbmFsgrSolver::~LbmFsgrSolver",DM_MSG," Avg. MLSUPS:"<<(mAvgMLSUPS/mAvgMLSUPSCnt), 5);
if(!mSilent) debMsgStd("LbmFsgrSolver::~LbmFsgrSolver",DM_MSG,"Deleted...",10);