mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
gui/miscsettings_menu.cpp: fix memleak - CMiscNotifier
This commit is contained in:
@@ -214,6 +214,7 @@ int CMiscMenue::showMiscSettingsMenu()
|
||||
int res = misc_menue.exec(NULL, "");
|
||||
delete fanNotifier;
|
||||
delete sectionsdConfigNotifier;
|
||||
delete miscNotifier;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -254,7 +255,7 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy)
|
||||
CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, g_settings.shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 ");
|
||||
CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, g_settings.shutdown_count, miscSettings_shutdown_count);
|
||||
|
||||
CMiscNotifier* miscNotifier = new CMiscNotifier( m1, m2 );
|
||||
miscNotifier = new CMiscNotifier( m1, m2 );
|
||||
|
||||
ms_energy->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier));
|
||||
ms_energy->addItem(m1);
|
||||
|
@@ -41,6 +41,7 @@ class CMiscMenue : public CMenuTarget
|
||||
private:
|
||||
CFanControlNotifier *fanNotifier;
|
||||
CSectionsdConfigNotifier* sectionsdConfigNotifier;
|
||||
CMiscNotifier* miscNotifier;
|
||||
|
||||
int width;
|
||||
|
||||
|
Reference in New Issue
Block a user