From d4b973faff763c4d618c19850c2b13c523410b59 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 4 May 2012 15:50:05 +0400 Subject: [PATCH] gui/info_menue.cpp: fix memleaks when using CMenuForwarder Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7a1a165670f08c080584dddd5b90e6ffcd2fce60 Author: [CST] Focus Date: 2012-05-04 (Fri, 04 May 2012) --- src/gui/info_menue.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index eed7d3ca7..70cbd7aa5 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -68,10 +68,14 @@ int CInfoMenu::showMenu() { CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_INFOMENUE); + CImageInfo imageinfo; + CDBoxInfoWidget boxinfo; + CStreamInfo2 streaminfo; + info->addIntroItems(); - info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, new CImageInfo(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false); - info->addItem(new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); - info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, new CStreamInfo2(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); + info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, &imageinfo, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false); + info->addItem(new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, &boxinfo, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); + info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, &streaminfo, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); int res = info->exec(NULL, ""); info->hide();