aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/picture.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/picture.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/picture.cpp')
-rw-r--r--engines/toon/picture.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 11a5572066..b797079c00 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -130,7 +130,13 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
}
Picture::Picture(ToonEngine *vm) : _vm(vm) {
+ _data = NULL;
+ _palette = NULL;
+}
+Picture::~Picture() {
+ delete[] _data;
+ delete[] _palette;
}
void Picture::setupPalette() {