gui/record_setup.cpp: fix memleak - CRecAPIDSettingsNotifier

This commit is contained in:
[CST] Focus
2012-05-07 12:24:54 +04:00
parent 9c91058469
commit 4435fc24c2
2 changed files with 6 additions and 8 deletions

View File

@@ -172,6 +172,7 @@ int CRecordSetup::showRecordSetup()
//menue init //menue init
RecordingSafetyNotifier = new CRecordingSafetyNotifier; RecordingSafetyNotifier = new CRecordingSafetyNotifier;
APIDNotifier = new CRecAPIDSettingsNotifier;
CMenuWidget* recordingSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP); CMenuWidget* recordingSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP);
//apply settings //apply settings
@@ -216,6 +217,7 @@ int CRecordSetup::showRecordSetup()
recordingSettings->hide(); recordingSettings->hide();
delete recordingSettings; delete recordingSettings;
delete RecordingSafetyNotifier; delete RecordingSafetyNotifier;
delete APIDNotifier;
return res; return res;
} }
@@ -257,10 +259,9 @@ void CRecordSetup::showRecordAudioSetup(CMenuWidget *menu_audiosettings)
g_settings.recording_audio_pids_ac3 = ( g_settings.recording_audio_pids_default & TIMERD_APIDS_AC3 ) ? 1 : 0 ; g_settings.recording_audio_pids_ac3 = ( g_settings.recording_audio_pids_default & TIMERD_APIDS_AC3 ) ? 1 : 0 ;
//audio pids //audio pids
CRecAPIDSettingsNotifier * an = new CRecAPIDSettingsNotifier; CMenuOptionChooser* aoj1 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_STD, &g_settings.recording_audio_pids_std, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, APIDNotifier);
CMenuOptionChooser* aoj1 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_STD, &g_settings.recording_audio_pids_std, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, an); CMenuOptionChooser* aoj2 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_ALT, &g_settings.recording_audio_pids_alt, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, APIDNotifier);
CMenuOptionChooser* aoj2 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_ALT, &g_settings.recording_audio_pids_alt, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, an); CMenuOptionChooser* aoj3 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_AC3, &g_settings.recording_audio_pids_ac3, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, APIDNotifier);
CMenuOptionChooser* aoj3 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_AC3, &g_settings.recording_audio_pids_ac3, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, an);
menu_audiosettings->addIntroItems(LOCALE_RECORDINGMENU_APIDS); menu_audiosettings->addIntroItems(LOCALE_RECORDINGMENU_APIDS);
menu_audiosettings->addItem(aoj1); menu_audiosettings->addItem(aoj1);
@@ -284,7 +285,3 @@ void CRecordSetup::showRecordTimeShiftSetup(CMenuWidget *menu_ts)
menu_ts->addItem(new CMenuOptionChooser(LOCALE_EXTRA_TEMP_TIMESHIFT, &g_settings.temp_timeshift, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); menu_ts->addItem(new CMenuOptionChooser(LOCALE_EXTRA_TEMP_TIMESHIFT, &g_settings.temp_timeshift, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
} }
} }

View File

@@ -41,6 +41,7 @@ class CRecordSetup : public CMenuTarget
private: private:
int width; int width;
CRecordingSafetyNotifier *RecordingSafetyNotifier; CRecordingSafetyNotifier *RecordingSafetyNotifier;
CRecAPIDSettingsNotifier * APIDNotifier;
int showRecordSetup(); int showRecordSetup();
void showRecordTimerSetup(CMenuWidget *menu_timersettings); void showRecordTimerSetup(CMenuWidget *menu_timersettings);