aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-07 01:24:42 +0100
committerEugene Sandulenko2016-01-07 01:24:42 +0100
commit46076a0e6c6a6f35f979dc26c70fd023a3282626 (patch)
treefce9ad30f5421a3a52dc980faee5503a4d09fff5 /engines/wage
parent4d3707d7956352acb69f05e45084ee1964a2577f (diff)
downloadscummvm-rg350-46076a0e6c6a6f35f979dc26c70fd023a3282626.tar.gz
scummvm-rg350-46076a0e6c6a6f35f979dc26c70fd023a3282626.tar.bz2
scummvm-rg350-46076a0e6c6a6f35f979dc26c70fd023a3282626.zip
WAGE: Plugged great deal of leaks
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/design.h2
-rw-r--r--engines/wage/entities.cpp2
-rw-r--r--engines/wage/gui.cpp1
-rw-r--r--engines/wage/script.cpp4
-rw-r--r--engines/wage/wage.cpp1
-rw-r--r--engines/wage/world.cpp11
6 files changed, 18 insertions, 3 deletions
diff --git a/engines/wage/design.h b/engines/wage/design.h
index 74ee5b3219..300d6fadf3 100644
--- a/engines/wage/design.h
+++ b/engines/wage/design.h
@@ -60,7 +60,7 @@ public:
~Design();
void setBounds(Common::Rect *bounds) {
- _bounds = new Common::Rect(*bounds);
+ _bounds = bounds;
}
Common::Rect *getBounds() {
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index 1a9e936a61..dbf156fbba 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -56,7 +56,7 @@
namespace Wage {
void Designed::setDesignBounds(Common::Rect *bounds) {
- _designBounds = new Common::Rect(*bounds);
+ _designBounds = bounds;
_design->setBounds(bounds);
}
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 668a20f2f4..7f76daf111 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -176,6 +176,7 @@ Gui::Gui(WageEngine *engine) {
Gui::~Gui() {
_screen.free();
+ _console.free();
g_system->getTimerManager()->removeTimerProc(&cursor_timer_handler);
}
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp
index 5bc1bb74f1..4fdbddb501 100644
--- a/engines/wage/script.cpp
+++ b/engines/wage/script.cpp
@@ -1271,7 +1271,9 @@ void Script::convertToText() {
}
if (scr->line.size())
- _scriptText.push_back(scr);
+ _scriptText.push_back(scr);
+ else
+ delete scr;
}
} // End of namespace Wage
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp
index 7ea5bc13d2..0cac983c8f 100644
--- a/engines/wage/wage.cpp
+++ b/engines/wage/wage.cpp
@@ -91,6 +91,7 @@ WageEngine::~WageEngine() {
delete _resManager;
delete _gui;
delete _rnd;
+ delete _console;
}
Common::Error WageEngine::run() {
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp
index c525bd33cc..188754534c 100644
--- a/engines/wage/world.cpp
+++ b/engines/wage/world.cpp
@@ -84,6 +84,17 @@ World::~World() {
for (uint i = 0; i < _orderedScenes.size(); i++)
delete _orderedScenes[i];
+
+ for (uint i = 0; i < _patterns.size(); i++)
+ free(_patterns[i]);
+
+ delete _globalScript;
+
+ delete _gameOverMessage;
+ delete _saveBeforeQuitMessage;
+ delete _saveBeforeCloseMessage;
+ delete _revertMessage;
+
}
bool World::loadWorld(Common::MacResManager *resMan) {