diff options
| author | jacob1 <jfu614@gmail.com> | 2013-03-09 01:56:54 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-03-09 01:56:54 (GMT) |
| commit | f9c219da93983ca0a3c5fc7e2f0579c4a44bca40 (patch) | |
| tree | 401ba98898cc475eb5a29f927f9919dbb48c04c1 /src/game/GameController.cpp | |
| parent | 89c784fcfa80900c7925da258e91feeee2a2ab96 (diff) | |
| download | powder-f9c219da93983ca0a3c5fc7e2f0579c4a44bca40.zip powder-f9c219da93983ca0a3c5fc7e2f0579c4a44bca40.tar.gz | |
a few more memory leak fixes
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 1e10b0e..993e768 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -196,6 +196,22 @@ GameController::~GameController() { ui::Engine::Ref().CloseWindow(); } + //deleted here because it refuses to be deleted when deleted from gameModel even with the same code + std::deque<Snapshot*> history = gameModel->GetHistory(); + for(std::deque<Snapshot*>::iterator iter = history.begin(), end = history.end(); iter != end; ++iter) + { + delete *iter; + } + std::vector<QuickOption*> quickOptions = gameModel->GetQuickOptions(); + for(std::vector<QuickOption*>::iterator iter = quickOptions.begin(), end = quickOptions.end(); iter != end; ++iter) + { + delete *iter; + } + std::vector<Notification*> notifications = gameModel->GetNotifications(); + for(std::vector<Notification*>::iterator iter = notifications.begin(); iter != notifications.end(); ++iter) + { + delete *iter; + } delete gameModel; delete gameView; } |
