mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 17:03:05 +00:00
Fixing some memory leaks in the GUI code
svn-id: r26515
This commit is contained in:
parent
aecd100f93
commit
f8067d54e5
@ -71,6 +71,7 @@ void TabWidget::init() {
|
||||
}
|
||||
|
||||
TabWidget::~TabWidget() {
|
||||
_firstWidget = 0;
|
||||
for (uint i = 0; i < _tabs.size(); ++i) {
|
||||
delete _tabs[i].firstWidget;
|
||||
_tabs[i].firstWidget = 0;
|
||||
|
@ -65,11 +65,6 @@ Dialog::Dialog(const Common::String &name, bool dimsInactive_)
|
||||
}
|
||||
}
|
||||
|
||||
Dialog::~Dialog() {
|
||||
delete _firstWidget;
|
||||
_firstWidget = 0;
|
||||
}
|
||||
|
||||
int Dialog::runModal() {
|
||||
// Open up
|
||||
open();
|
||||
|
@ -54,7 +54,6 @@ private:
|
||||
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();
|
||||
|
||||
|
@ -31,10 +31,8 @@ GuiObject::GuiObject(const Common::String &name) : _firstWidget(0) {
|
||||
}
|
||||
|
||||
GuiObject::~GuiObject() {
|
||||
/* TODO: Enable this at some point? Right now it causes crashes
|
||||
delete _firstWidget;
|
||||
_firstWidget = 0;
|
||||
*/
|
||||
}
|
||||
|
||||
uint32 GuiObject::getMillis() {
|
||||
|
@ -58,6 +58,7 @@ void Widget::resize(int x, int y, int w, int h) {
|
||||
|
||||
Widget::~Widget() {
|
||||
delete _next;
|
||||
_next = 0;
|
||||
}
|
||||
|
||||
void Widget::draw() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user