aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorDavid Turner2010-11-16 09:26:35 +0000
committerDavid Turner2010-11-16 09:26:35 +0000
commita9b3dccaaaf62f6780335f630c016844ac10ff0a (patch)
tree531f745c151b0ed1d14fe925a15adc1f2f54a359 /gui
parent62400d263824556d150686ac991cae2eab0183d2 (diff)
downloadscummvm-rg350-a9b3dccaaaf62f6780335f630c016844ac10ff0a.tar.gz
scummvm-rg350-a9b3dccaaaf62f6780335f630c016844ac10ff0a.tar.bz2
scummvm-rg350-a9b3dccaaaf62f6780335f630c016844ac10ff0a.zip
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. svn-id: r54260
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp19
-rw-r--r--gui/options.h3
2 files changed, 18 insertions, 4 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 2562ed64fa..418372e7cf 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -80,8 +80,6 @@ static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1
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 @@ OptionsDialog::OptionsDialog(const Common::String &domain, const Common::String
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;
diff --git a/gui/options.h b/gui/options.h
index 0d9ea117b3..b8a084ed7b 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -47,6 +47,7 @@ class OptionsDialog : public Dialog {
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 @@ private:
StaticTextWidget *_gmDevicePopUpDesc;
PopUpWidget *_gmDevicePopUp;
-
-
//
// MIDI controls
//