From a635d29ae88f89fe792970416b4645bb1c48d8b9 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Sat, 5 May 2012 14:32:34 +0400 Subject: [PATCH] gui/pictureviewer_setup.cpp: fix memleaks when using CMenuForwarder Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b0548bdc44fcf60f32a7b1ddd1a8cb61203ed6a5 Author: [CST] Focus Date: 2012-05-05 (Sat, 05 May 2012) --- src/gui/pictureviewer_setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/pictureviewer_setup.cpp b/src/gui/pictureviewer_setup.cpp index 94bbac561..2a4e6078b 100644 --- a/src/gui/pictureviewer_setup.cpp +++ b/src/gui/pictureviewer_setup.cpp @@ -106,8 +106,8 @@ int CPictureViewerSetup::showPictureViewerSetup() picviewsetup->addIntroItems(LOCALE_PICTUREVIEWER_HEAD); picviewsetup->addItem(new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING , &g_settings.picviewer_scaling , PICTUREVIEWER_SCALING_OPTIONS , PICTUREVIEWER_SCALING_OPTION_COUNT , true )); - CStringInput * pic_timeout= new CStringInput(LOCALE_PICTUREVIEWER_SLIDE_TIME, g_settings.picviewer_slide_time, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 "); - picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, pic_timeout)); + CStringInput pic_timeout(LOCALE_PICTUREVIEWER_SLIDE_TIME, g_settings.picviewer_slide_time, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 "); + picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, &pic_timeout)); picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir")); int res = picviewsetup->exec(NULL, "");