[Scummvm-cvs-logs] SF.net SVN: scummvm:[46325] scummvm/trunk/graphics
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Dec 10 00:05:16 CET 2009
Revision: 46325
http://scummvm.svn.sourceforge.net/scummvm/?rev=46325&view=rev
Author: lordhoto
Date: 2009-12-09 23:05:15 +0000 (Wed, 09 Dec 2009)
Log Message:
-----------
Properly clean up memory when destroying CursorManager.
Modified Paths:
--------------
scummvm/trunk/graphics/cursorman.cpp
scummvm/trunk/graphics/cursorman.h
Modified: scummvm/trunk/graphics/cursorman.cpp
===================================================================
--- scummvm/trunk/graphics/cursorman.cpp 2009-12-09 23:04:54 UTC (rev 46324)
+++ scummvm/trunk/graphics/cursorman.cpp 2009-12-09 23:05:15 UTC (rev 46325)
@@ -31,6 +31,15 @@
namespace Graphics {
+CursorManager::~CursorManager() {
+ for (int i = 0; i < _cursorStack.size(); ++i)
+ delete _cursorStack[i];
+ _cursorStack.clear();
+ for (int i = 0; i < _cursorPaletteStack.size(); ++i)
+ delete _cursorPaletteStack[i];
+ _cursorPaletteStack.clear();
+}
+
bool CursorManager::isVisible() {
if (_cursorStack.empty())
return false;
Modified: scummvm/trunk/graphics/cursorman.h
===================================================================
--- scummvm/trunk/graphics/cursorman.h 2009-12-09 23:04:54 UTC (rev 46324)
+++ scummvm/trunk/graphics/cursorman.h 2009-12-09 23:05:15 UTC (rev 46325)
@@ -165,6 +165,7 @@
// ourselves, so it is private and thus there is no way to create this class
// except from the Singleton code.
CursorManager() {}
+ ~CursorManager();
struct Cursor {
byte *_data;
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