diff options
author | Alyssa Milburn | 2011-07-18 15:04:57 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-07-18 15:04:57 +0200 |
commit | 7f2f38e5da88aba6cc2377ea05ee4bef3d4f0445 (patch) | |
tree | 7b6d0fbe9d066a8c08e383ea7c8e988b6d391d28 | |
parent | f6cd3357e8d99b91dc3f35c4af691364c17530cb (diff) | |
download | scummvm-rg350-7f2f38e5da88aba6cc2377ea05ee4bef3d4f0445.tar.gz scummvm-rg350-7f2f38e5da88aba6cc2377ea05ee4bef3d4f0445.tar.bz2 scummvm-rg350-7f2f38e5da88aba6cc2377ea05ee4bef3d4f0445.zip |
COMPOSER: Fix a couple of memory leaks spotted by digitall.
-rw-r--r-- | engines/composer/composer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index 683e30f8fe..1d5706142d 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -703,6 +703,8 @@ ComposerEngine::~ComposerEngine() { for (Common::List<Library>::iterator i = _libraries.begin(); i != _libraries.end(); i++) delete i->_archive; + for (Common::List<Sprite>::iterator i = _sprites.begin(); i != _sprites.end(); i++) + i->_surface.free(); delete _rnd; } @@ -1029,6 +1031,7 @@ void ComposerEngine::unloadLibrary(uint id) { _queuedScripts[j]._scriptId = 0; } + delete i->_archive; _libraries.erase(i); return; } |