aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-18 10:19:59 +0100
committerEugene Sandulenko2016-02-18 10:30:34 +0100
commitb01fb9f3f32f3d61a6e0988988b303118719751f (patch)
tree6c6ef53eed155aa4a6c29107dc04180eacc6161c /engines
parenta2dcddc06d945b443e897c8b60c1f7d5f8169637 (diff)
downloadscummvm-rg350-b01fb9f3f32f3d61a6e0988988b303118719751f.tar.gz
scummvm-rg350-b01fb9f3f32f3d61a6e0988988b303118719751f.tar.bz2
scummvm-rg350-b01fb9f3f32f3d61a6e0988988b303118719751f.zip
WAGE: Plug memory leak
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/world.cpp11
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));
}
}