[Scummvm-cvs-logs] SF.net SVN: scummvm:[55400] scummvm/trunk/engines/toon/toon.cpp

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Sat Jan 22 00:43:04 CET 2011


Revision: 55400
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55400&view=rev
Author:   tdhs
Date:     2011-01-21 23:43:02 +0000 (Fri, 21 Jan 2011)

Log Message:
-----------
TOON: Fix Memory Leak when opening Inventory.

Modified Paths:
--------------
    scummvm/trunk/engines/toon/toon.cpp

Modified: scummvm/trunk/engines/toon/toon.cpp
===================================================================
--- scummvm/trunk/engines/toon/toon.cpp	2011-01-21 23:24:17 UTC (rev 55399)
+++ scummvm/trunk/engines/toon/toon.cpp	2011-01-21 23:43:02 UTC (rev 55400)
@@ -741,6 +741,7 @@
 	_system = syst;
 	_tickLength = 16;
 	_currentPicture = NULL;
+	_inventoryPicture = NULL;
 	_currentMask = NULL;
 	_showConversationText = true;
 	_isDemo = _gameDescription->flags & ADGF_DEMO;
@@ -828,6 +829,7 @@
 ToonEngine::~ToonEngine() {
 	delete _currentPicture;
 	delete _currentMask;
+	delete _inventoryPicture;
 
 	delete _resources;
 	delete _animationManager;
@@ -2564,6 +2566,7 @@
 	int32 oldScrollValue = _gameState->_currentScrollValue;
 // Strangerke - Commented (not used)
 //	Common::EventManager *_event = _system->getEventManager();
+	delete _inventoryPicture;
 	_inventoryPicture = new Picture(this);
 	fadeOut(5);
 	_inventoryPicture->loadPicture("SACK128.CPS", true);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list