diff options
author | Matthew Hoops | 2012-09-09 16:21:29 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-09 16:21:29 -0400 |
commit | 9855f7b5d8a5d6ae0537313ea1f3737f25e4d97f (patch) | |
tree | e1bef9f800fd93155995d3ec694b51da120f20d4 /engines | |
parent | b8bcbb46b47b30c87a0267211ae4aae4c61c4c78 (diff) | |
download | scummvm-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.cpp | 5 |
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; |