aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/world.cpp
diff options
context:
space:
mode:
authorBorja Lorente2016-08-13 16:57:42 +0200
committerBorja Lorente2016-08-19 16:29:17 +0200
commit44a6f8a1dbdfa271aaa9ccf4b1ecc48e275ca11a (patch)
treea71afc88f925667dcd30c75395783abb67d1a5a2 /engines/macventure/world.cpp
parent479f01b5a708ed1e3294ef1d553d37d270cb97c4 (diff)
downloadscummvm-rg350-44a6f8a1dbdfa271aaa9ccf4b1ecc48e275ca11a.tar.gz
scummvm-rg350-44a6f8a1dbdfa271aaa9ccf4b1ecc48e275ca11a.tar.bz2
scummvm-rg350-44a6f8a1dbdfa271aaa9ccf4b1ecc48e275ca11a.zip
MACVENTURE: Fix minor memory leaks
Diffstat (limited to 'engines/macventure/world.cpp')
-rw-r--r--engines/macventure/world.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/macventure/world.cpp b/engines/macventure/world.cpp
index 82a8952f02..708ccfec33 100644
--- a/engines/macventure/world.cpp
+++ b/engines/macventure/world.cpp
@@ -9,6 +9,7 @@ World::World(MacVentureEngine *engine, Common::MacResManager *resMan) {
_resourceManager = resMan;
_engine = engine;
_saveGame = NULL;
+ _gameText = NULL;
startNewGame();
@@ -26,6 +27,9 @@ World::~World() {
if (_objectConstants)
delete _objectConstants;
+
+ if (_gameText)
+ delete _gameText;
}
void World::startNewGame() {
@@ -45,7 +49,7 @@ void World::startNewGame() {
_saveGame = new SaveGame(_engine, saveGameRes);
calculateObjectRelations();
-
+
delete saveGameRes;
saveGameFile.close();
}
@@ -70,6 +74,7 @@ uint32 World::getObjAttr(ObjID objID, uint32 attrID) {
if (res & 0x8000)
res = -((res ^ 0xffff) + 1);
debugC(5, kMVDebugMain, "Attribute %x from object %x is %x", attrID, objID, res);
+ delete objStream;
return res;
}