gui/miscsettings_menu.cpp: fix memleak - sectionsdConfigNotifier

This commit is contained in:
[CST] Focus
2012-05-07 12:13:38 +04:00
parent 4d620569b4
commit 0a94cd0267
2 changed files with 4 additions and 1 deletions

View File

@@ -161,6 +161,7 @@ int CMiscMenue::showMiscSettingsMenu()
{ {
//misc settings //misc settings
fanNotifier = new CFanControlNotifier(); fanNotifier = new CFanControlNotifier();
sectionsdConfigNotifier = new CSectionsdConfigNotifier();
CMenuWidget misc_menue(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP); CMenuWidget misc_menue(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP);
misc_menue.addIntroItems(LOCALE_MISCSETTINGS_HEAD); misc_menue.addIntroItems(LOCALE_MISCSETTINGS_HEAD);
@@ -213,6 +214,7 @@ int CMiscMenue::showMiscSettingsMenu()
int res = misc_menue.exec(NULL, ""); int res = misc_menue.exec(NULL, "");
misc_menue.hide(); misc_menue.hide();
delete fanNotifier; delete fanNotifier;
delete sectionsdConfigNotifier;
return res; return res;
} }
@@ -266,7 +268,6 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg)
{ {
ms_epg->addIntroItems(LOCALE_MISCSETTINGS_EPG_HEAD); ms_epg->addIntroItems(LOCALE_MISCSETTINGS_EPG_HEAD);
CSectionsdConfigNotifier* sectionsdConfigNotifier = new CSectionsdConfigNotifier;
ms_epg->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); ms_epg->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &g_settings.epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &g_settings.epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier);

View File

@@ -40,6 +40,8 @@ class CMiscMenue : public CMenuTarget
{ {
private: private:
CFanControlNotifier *fanNotifier; CFanControlNotifier *fanNotifier;
CSectionsdConfigNotifier* sectionsdConfigNotifier;
int width; int width;
int showMiscSettingsMenu(); int showMiscSettingsMenu();