From 4acad22d6e28d647c3233c183e3104b9d02a86e5 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sun, 7 Nov 2010 21:08:46 +0000 Subject: 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 --- engines/toon/picture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/toon/picture.cpp') 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() { -- cgit v1.2.3