Skip to content

Commit

Permalink
PEGASUS: Fix some memory leaks
Browse files Browse the repository at this point in the history
Thanks to fuzzie for spotting
  • Loading branch information
Matthew Hoops committed Sep 9, 2012
1 parent b8bcbb4 commit 9855f7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engines/pegasus/pegasus.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 9855f7b

Please sign in to comment.