diff options
author | Eugene Sandulenko | 2016-02-18 10:19:59 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-18 10:30:34 +0100 |
commit | b01fb9f3f32f3d61a6e0988988b303118719751f (patch) | |
tree | 6c6ef53eed155aa4a6c29107dc04180eacc6161c /engines/wage | |
parent | a2dcddc06d945b443e897c8b60c1f7d5f8169637 (diff) | |
download | scummvm-rg350-b01fb9f3f32f3d61a6e0988988b303118719751f.tar.gz scummvm-rg350-b01fb9f3f32f3d61a6e0988988b303118719751f.tar.bz2 scummvm-rg350-b01fb9f3f32f3d61a6e0988988b303118719751f.zip |
WAGE: Plug memory leak
Diffstat (limited to 'engines/wage')
-rw-r--r-- | engines/wage/world.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 6c74911a86..63b77a5501 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -359,18 +359,17 @@ void World::loadExternalSounds(Common::String fname) { } in.close(); - Common::MacResManager *resMan; - resMan = new Common::MacResManager(); - resMan->open(fname); + Common::MacResManager resMan; + resMan.open(fname); Common::MacResIDArray resArray; Common::SeekableReadStream *res; Common::MacResIDArray::const_iterator iter; - resArray = resMan->getResIDArray(MKTAG('A','S','N','D')); + resArray = resMan.getResIDArray(MKTAG('A','S','N','D')); for (iter = resArray.begin(); iter != resArray.end(); ++iter) { - res = resMan->getResource(MKTAG('A','S','N','D'), *iter); - addSound(new Sound(resMan->getResName(MKTAG('A','S','N','D'), *iter), res)); + res = resMan.getResource(MKTAG('A','S','N','D'), *iter); + addSound(new Sound(resMan.getResName(MKTAG('A','S','N','D'), *iter), res)); } } |