diff options
| author | jacob1 <jfu614@gmail.com> | 2013-02-24 20:23:34 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-02-24 20:23:34 (GMT) |
| commit | b92bd245c8b1311b6cd63171611e47a6468e410f (patch) | |
| tree | 141f09ef4f17901013442c2dd381ac0032178836 /src/game/GameModel.cpp | |
| parent | 0939494747908bb702f24598e883c3d1f70e3710 (diff) | |
| download | powder-b92bd245c8b1311b6cd63171611e47a6468e410f.zip powder-b92bd245c8b1311b6cd63171611e47a6468e410f.tar.gz | |
fix 4 MB memory leak on every save
Diffstat (limited to 'src/game/GameModel.cpp')
| -rw-r--r-- | src/game/GameModel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index bc8ec4f..0dbf2f7 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -175,6 +175,10 @@ GameModel::~GameModel() { delete brushList[i]; } + for(std::deque<Snapshot*>::iterator iter = history.begin(), end = history.end(); iter != end; ++iter) + { + delete *iter; + } delete sim; delete ren; if(placeSave) |
