aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-06 23:58:37 +0100
committerEugene Sandulenko2016-01-06 23:58:37 +0100
commitf9ea23f6a5e0359aa5bad1be7a38d25922e35791 (patch)
tree42a7940782b6db0e20016e6fbae857bcf0830e39
parentac6e5cc48a63940954d23e9fe3d59e8e2779b860 (diff)
downloadscummvm-rg350-f9ea23f6a5e0359aa5bad1be7a38d25922e35791.tar.gz
scummvm-rg350-f9ea23f6a5e0359aa5bad1be7a38d25922e35791.tar.bz2
scummvm-rg350-f9ea23f6a5e0359aa5bad1be7a38d25922e35791.zip
WAGE: More leak plugging
-rw-r--r--engines/wage/entities.cpp6
-rw-r--r--engines/wage/script.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index d99ad74db2..606e30993c 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -122,6 +122,8 @@ Scene::Scene(String name, Common::SeekableReadStream *data) {
_soundName = readPascalString(data);
_visited = false;
+
+ delete data;
}
Scene::~Scene() {
@@ -225,6 +227,8 @@ Obj::Obj(String name, Common::SeekableReadStream *data) {
_failureMessage = readPascalString(data);
_useMessage = readPascalString(data);
_sound = readPascalString(data);
+
+ delete data;
}
Chr *Obj::removeFromChr() {
@@ -333,6 +337,8 @@ Chr::Chr(String name, Common::SeekableReadStream *data) {
for (int i = 0; i < NUMBER_OF_ARMOR_TYPES; i++)
_armor[i] = NULL;
+
+ delete data;
}
void Chr::resetState() {
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp
index a80f0ac2c0..b8b71ea550 100644
--- a/engines/wage/script.cpp
+++ b/engines/wage/script.cpp
@@ -62,6 +62,8 @@ Script::~Script() {
for (int i = 0; i < _scriptText.size(); i++) {
delete _scriptText[i];
}
+
+ delete _data;
}
void Script::print() {