[Scummvm-cvs-logs] SF.net SVN: scummvm:[54260] scummvm/trunk/gui
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Tue Nov 16 10:26:36 CET 2010
Revision: 54260
http://scummvm.svn.sourceforge.net/scummvm/?rev=54260&view=rev
Author: tdhs
Date: 2010-11-16 09:26:35 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
GUI: Fixed Memory Leak in RadiobuttonGroup usage in Options Dialog.
RadiobuttonGroup has a destructor which must be called to avoid leaking memory.
Have also added missing NULL init() declarations on object member pointers to avoid any future issues.
Modified Paths:
--------------
scummvm/trunk/gui/options.cpp
scummvm/trunk/gui/options.h
Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp 2010-11-16 08:24:11 UTC (rev 54259)
+++ scummvm/trunk/gui/options.cpp 2010-11-16 09:26:35 UTC (rev 54260)
@@ -80,8 +80,6 @@
static const char *outputRateLabels[] = { _s("<default>"), _s("8 kHz"), _s("11kHz"), _s("22 kHz"), _s("44 kHz"), _s("48 kHz"), 0 };
static const int outputRateValues[] = { 0, 8000, 11025, 22050, 44100, 48000, -1 };
-
-
OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
init();
@@ -92,23 +90,40 @@
init();
}
+OptionsDialog::~OptionsDialog() {
+ delete _subToggleGroup;
+}
+
void OptionsDialog::init() {
_enableGraphicSettings = false;
_gfxPopUp = 0;
+ _gfxPopUpDesc = 0;
_renderModePopUp = 0;
+ _renderModePopUpDesc = 0;
_fullscreenCheckbox = 0;
_aspectCheckbox = 0;
_disableDitheringCheckbox = 0;
_enableAudioSettings = false;
_midiPopUp = 0;
+ _midiPopUpDesc = 0;
_oplPopUp = 0;
+ _oplPopUpDesc = 0;
_outputRatePopUp = 0;
+ _outputRatePopUpDesc = 0;
_enableMIDISettings = false;
_gmDevicePopUp = 0;
+ _gmDevicePopUpDesc = 0;
+ _soundFont = 0;
+ _soundFontButton = 0;
+ _soundFontClearButton = 0;
_multiMidiCheckbox = 0;
+ _midiGainDesc = 0;
+ _midiGainSlider = 0;
+ _midiGainLabel = 0;
_enableMT32Settings = false;
_mt32Checkbox = 0;
_mt32DevicePopUp = 0;
+ _mt32DevicePopUpDesc = 0;
_enableGSCheckbox = 0;
_enableVolumeSettings = false;
_musicVolumeDesc = 0;
Modified: scummvm/trunk/gui/options.h
===================================================================
--- scummvm/trunk/gui/options.h 2010-11-16 08:24:11 UTC (rev 54259)
+++ scummvm/trunk/gui/options.h 2010-11-16 09:26:35 UTC (rev 54260)
@@ -47,6 +47,7 @@
public:
OptionsDialog(const Common::String &domain, int x, int y, int w, int h);
OptionsDialog(const Common::String &domain, const Common::String &name);
+ ~OptionsDialog();
void init();
@@ -116,8 +117,6 @@
StaticTextWidget *_gmDevicePopUpDesc;
PopUpWidget *_gmDevicePopUp;
-
-
//
// MIDI controls
//
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