aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/toon.cpp
diff options
context:
space:
mode:
authorDavid Turner2010-11-07 21:08:46 +0000
committerDavid Turner2010-11-07 21:08:46 +0000
commit4acad22d6e28d647c3233c183e3104b9d02a86e5 (patch)
tree33f9b7326b1aaa02d4a4baf11eca18ebcacb0ba6 /engines/toon/toon.cpp
parentce733ab75a9af19fe203930b37f9fc7fb8712cae (diff)
downloadscummvm-rg350-4acad22d6e28d647c3233c183e3104b9d02a86e5.tar.gz
scummvm-rg350-4acad22d6e28d647c3233c183e3104b9d02a86e5.tar.bz2
scummvm-rg350-4acad22d6e28d647c3233c183e3104b9d02a86e5.zip
TOON: Corrections to close some memory leaks.
These corrections close a number of leaks in the Toon engine reported by running Valgrind with --leak-check=full option. svn-id: r54127
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r--engines/toon/toon.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 9ccd947977..0ce993e6de 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -755,6 +755,10 @@ ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription)
DebugMan.addDebugChannel(kDebugTools, "Tools", "Tools debug level");
DebugMan.addDebugChannel(kDebugText, "Text", "Text debug level");
+ _hotspots = NULL;
+ _fontRenderer = NULL;
+ _fontToon = NULL;
+ _fontEZ = NULL;
_console = new ToonConsole(this);
switch (_language) {
@@ -783,6 +787,11 @@ ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription)
}
ToonEngine::~ToonEngine() {
+ delete _fontRenderer;
+ delete _fontToon;
+ delete _fontEZ;
+ delete[] _hotspots;
+
DebugMan.clearAllDebugChannels();
delete _console;
}