[Scummvm-cvs-logs] SF.net SVN: scummvm:[55364] scummvm/trunk/gui
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Thu Jan 20 23:32:30 CET 2011
Revision: 55364
http://scummvm.svn.sourceforge.net/scummvm/?rev=55364&view=rev
Author: tdhs
Date: 2011-01-20 22:32:30 +0000 (Thu, 20 Jan 2011)
Log Message:
-----------
GUI: Fix Memory Leak from PicButtonWidget _gfx Member.
This widget is only currently used by Hugo.
Modified Paths:
--------------
scummvm/trunk/gui/widget.cpp
scummvm/trunk/gui/widget.h
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2011-01-20 22:31:05 UTC (rev 55363)
+++ scummvm/trunk/gui/widget.cpp 2011-01-20 22:32:30 UTC (rev 55364)
@@ -318,6 +318,10 @@
_type = kButtonWidget;
}
+PicButtonWidget::~PicButtonWidget() {
+ _gfx.free();
+}
+
void PicButtonWidget::handleMouseUp(int x, int y, int button, int clickCount) {
if (isEnabled() && x >= 0 && x < _w && y >= 0 && y < _h)
sendCommand(_cmd, 0);
Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h 2011-01-20 22:31:05 UTC (rev 55363)
+++ scummvm/trunk/gui/widget.h 2011-01-20 22:32:30 UTC (rev 55364)
@@ -207,6 +207,7 @@
public:
PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
+ ~PicButtonWidget();
void setCmd(uint32 cmd) { _cmd = cmd; }
uint32 getCmd() const { return _cmd; }
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