[Scummvm-cvs-logs] SF.net SVN: scummvm: [32219] scummvm/branches/gsoc2008-rtl/engines/agos

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Fri May 23 01:40:37 CEST 2008


Revision: 32219
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32219&view=rev
Author:   cpage88
Date:     2008-05-22 16:40:36 -0700 (Thu, 22 May 2008)

Log Message:
-----------
AGOS: Fixed a memory leak from earlier in a better way

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/agos/icons.cpp
    scummvm/branches/gsoc2008-rtl/engines/agos/intern.h

Modified: scummvm/branches/gsoc2008-rtl/engines/agos/icons.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agos/icons.cpp	2008-05-22 21:26:56 UTC (rev 32218)
+++ scummvm/branches/gsoc2008-rtl/engines/agos/icons.cpp	2008-05-22 23:40:36 UTC (rev 32219)
@@ -534,8 +534,6 @@
 		window->iconPtr->upArrow = _scrollUpHitArea;
 		window->iconPtr->downArrow = _scrollDownHitArea;
 	}
-
-	free (window->iconPtr);
 }
 
 uint AGOSEngine_Feeble::setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr) {

Modified: scummvm/branches/gsoc2008-rtl/engines/agos/intern.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agos/intern.h	2008-05-22 21:26:56 UTC (rev 32218)
+++ scummvm/branches/gsoc2008-rtl/engines/agos/intern.h	2008-05-22 23:40:36 UTC (rev 32219)
@@ -161,6 +161,7 @@
 	uint8 fill_color, text_color;
 	IconBlock *iconPtr;
 	WindowBlock() { memset(this, 0, sizeof(*this)); }
+	~WindowBlock() { free (iconPtr); }
 };
 // note on text offset:
 // the actual x-coordinate is: textColumn * 8 + textColumnOffset


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