aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2012-09-09 16:21:29 -0400
committerMatthew Hoops2012-09-09 16:21:29 -0400
commit9855f7b5d8a5d6ae0537313ea1f3737f25e4d97f (patch)
treee1bef9f800fd93155995d3ec694b51da120f20d4 /engines
parentb8bcbb46b47b30c87a0267211ae4aae4c61c4c78 (diff)
downloadscummvm-rg350-9855f7b5d8a5d6ae0537313ea1f3737f25e4d97f.tar.gz
scummvm-rg350-9855f7b5d8a5d6ae0537313ea1f3737f25e4d97f.tar.bz2
scummvm-rg350-9855f7b5d8a5d6ae0537313ea1f3737f25e4d97f.zip
PEGASUS: Fix some memory leaks
Thanks to fuzzie for spotting
Diffstat (limited to 'engines')
-rw-r--r--engines/pegasus/pegasus.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 423d321fe0..b307a19ec8 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -104,7 +104,12 @@ PegasusEngine::~PegasusEngine() {
delete _rnd;
delete _introTimer;
delete _aiSaveStream;
+
+ for (ItemIterator it = _allItems.begin(); it != _allItems.end(); it++)
+ delete *it;
+
InputDeviceManager::destroy();
+ GameStateManager::destroy();
// NOTE: This must be deleted last!
delete _gfx;