[Scummvm-cvs-logs] SF.net SVN: scummvm: [26515] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Apr 15 21:03:26 CEST 2007
Revision: 26515
http://scummvm.svn.sourceforge.net/scummvm/?rev=26515&view=rev
Author: fingolfin
Date: 2007-04-15 12:03:25 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Fixing some memory leaks in the GUI code
Modified Paths:
--------------
scummvm/trunk/gui/TabWidget.cpp
scummvm/trunk/gui/dialog.cpp
scummvm/trunk/gui/dialog.h
scummvm/trunk/gui/object.cpp
scummvm/trunk/gui/widget.cpp
Modified: scummvm/trunk/gui/TabWidget.cpp
===================================================================
--- scummvm/trunk/gui/TabWidget.cpp 2007-04-15 18:27:10 UTC (rev 26514)
+++ scummvm/trunk/gui/TabWidget.cpp 2007-04-15 19:03:25 UTC (rev 26515)
@@ -71,6 +71,7 @@
}
TabWidget::~TabWidget() {
+ _firstWidget = 0;
for (uint i = 0; i < _tabs.size(); ++i) {
delete _tabs[i].firstWidget;
_tabs[i].firstWidget = 0;
Modified: scummvm/trunk/gui/dialog.cpp
===================================================================
--- scummvm/trunk/gui/dialog.cpp 2007-04-15 18:27:10 UTC (rev 26514)
+++ scummvm/trunk/gui/dialog.cpp 2007-04-15 19:03:25 UTC (rev 26515)
@@ -65,11 +65,6 @@
}
}
-Dialog::~Dialog() {
- delete _firstWidget;
- _firstWidget = 0;
-}
-
int Dialog::runModal() {
// Open up
open();
Modified: scummvm/trunk/gui/dialog.h
===================================================================
--- scummvm/trunk/gui/dialog.h 2007-04-15 18:27:10 UTC (rev 26514)
+++ scummvm/trunk/gui/dialog.h 2007-04-15 19:03:25 UTC (rev 26515)
@@ -54,7 +54,6 @@
public:
Dialog(int x, int y, int w, int h, bool dimsInactive = true);
Dialog(const Common::String &name, bool dimsInactive = true);
- virtual ~Dialog();
virtual int runModal();
Modified: scummvm/trunk/gui/object.cpp
===================================================================
--- scummvm/trunk/gui/object.cpp 2007-04-15 18:27:10 UTC (rev 26514)
+++ scummvm/trunk/gui/object.cpp 2007-04-15 19:03:25 UTC (rev 26515)
@@ -31,10 +31,8 @@
}
GuiObject::~GuiObject() {
-/* TODO: Enable this at some point? Right now it causes crashes
delete _firstWidget;
_firstWidget = 0;
-*/
}
uint32 GuiObject::getMillis() {
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2007-04-15 18:27:10 UTC (rev 26514)
+++ scummvm/trunk/gui/widget.cpp 2007-04-15 19:03:25 UTC (rev 26515)
@@ -58,6 +58,7 @@
Widget::~Widget() {
delete _next;
+ _next = 0;
}
void Widget::draw() {
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