From f64c13e08a76ec977560608371d79d0c1edeed46 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 7 May 2012 12:16:30 +0400 Subject: [PATCH] gui/record_setup.cpp: fix memlean - CRecordingSafetyNotifier Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9c91058469e1a7dc7d2eda6fd98f27a172d10761 Author: [CST] Focus Date: 2012-05-07 (Mon, 07 May 2012) --- src/gui/record_setup.cpp | 4 +++- src/gui/record_setup.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index 26834d2ce..f18b64765 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -170,6 +170,8 @@ const CMenuOptionChooser::keyval END_OF_RECORDING[END_OF_RECORDING_COUNT] = int CRecordSetup::showRecordSetup() { //menue init + + RecordingSafetyNotifier = new CRecordingSafetyNotifier; CMenuWidget* recordingSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_RECORDSETUP); //apply settings @@ -213,6 +215,7 @@ int CRecordSetup::showRecordSetup() int res = recordingSettings->exec(NULL, ""); recordingSettings->hide(); delete recordingSettings; + delete RecordingSafetyNotifier; return res; } @@ -225,7 +228,6 @@ void CRecordSetup::showRecordTimerSetup(CMenuWidget *menu_timersettings) sprintf(g_settings.record_safety_time_after, "%02d", post/60); //start - CRecordingSafetyNotifier *RecordingSafetyNotifier = new CRecordingSafetyNotifier; CStringInput * timerBefore = new CStringInput(LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE, g_settings.record_safety_time_before, 2, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE_HINT_1, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE_HINT_2,"0123456789 ", RecordingSafetyNotifier); CMenuForwarder *fTimerBefore = new CMenuDForwarder(LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_BEFORE, true, g_settings.record_safety_time_before, timerBefore); diff --git a/src/gui/record_setup.h b/src/gui/record_setup.h index cc41bc9b2..570675974 100644 --- a/src/gui/record_setup.h +++ b/src/gui/record_setup.h @@ -40,6 +40,7 @@ class CRecordSetup : public CMenuTarget { private: int width; + CRecordingSafetyNotifier *RecordingSafetyNotifier; int showRecordSetup(); void showRecordTimerSetup(CMenuWidget *menu_timersettings);