fix 4 MB memory leak on every save

This commit is contained in:
jacob1 2013-02-24 15:23:34 -05:00
parent 0939494747
commit b92bd245c8
2 changed files with 14 additions and 0 deletions

View File

@ -2064,6 +2064,16 @@ fin:
free(partsSaveIndex); free(partsSaveIndex);
if (soapLinkData) if (soapLinkData)
free(soapLinkData); free(soapLinkData);
if (partsPosData)
free(partsPosData);
if (partsPosFirstMap)
free(partsPosFirstMap);
if (partsPosLastMap)
free(partsPosLastMap);
if (partsPosCount)
free(partsPosCount);
if (partsPosLink)
free(partsPosLink);
return (char*)outputData; return (char*)outputData;
} }

View File

@ -175,6 +175,10 @@ GameModel::~GameModel()
{ {
delete brushList[i]; delete brushList[i];
} }
for(std::deque<Snapshot*>::iterator iter = history.begin(), end = history.end(); iter != end; ++iter)
{
delete *iter;
}
delete sim; delete sim;
delete ren; delete ren;
if(placeSave) if(placeSave)