summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp16
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;
}