diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index af8bbf2a6..f50d8bd04 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -2064,6 +2064,16 @@ fin: free(partsSaveIndex); if (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; } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index bc8ec4fda..0dbf2f7bf 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -175,6 +175,10 @@ GameModel::~GameModel() { delete brushList[i]; } + for(std::deque::iterator iter = history.begin(), end = history.end(); iter != end; ++iter) + { + delete *iter; + } delete sim; delete ren; if(placeSave)