From 107d65aafbfcb06737819869e39728ddcb7f1aea Mon Sep 17 00:00:00 2001 From: focus Date: Mon, 26 Mar 2012 15:27:46 +0000 Subject: [PATCH] gui/personalize.cpp: fix memleaks - delete all created CUserMenuSetup git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2163 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/personalize.cpp | 4 +++- src/gui/personalize.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index d5890e017..81897f0fd 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -330,6 +330,8 @@ int CPersonalizeGui::ShowPersonalizationMenu() delete pinChangeWidget; delete fkeyMenu; delete plMenu; + for(vector::iterator it = v_userMenuSetup.begin(); it != v_userMenuSetup.end(); ++it) + delete *it; v_userMenuSetup.clear(); delete user_menu_notifier; delete pin_setup_notifier; @@ -374,7 +376,7 @@ void CPersonalizeGui::ShowPreverredKeySetup(CMenuWidget* p_widget) //init usermenu items -void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vector v_umenu) +void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vector &v_umenu) { p_widget->addIntroItems(LOCALE_USERMENU_HEAD); diff --git a/src/gui/personalize.h b/src/gui/personalize.h index 869216b45..ff8f2cef7 100644 --- a/src/gui/personalize.h +++ b/src/gui/personalize.h @@ -162,7 +162,7 @@ class CPersonalizeGui : public CMenuTarget, public CChangeObserver, public CPINP void ShowMenuOptions(const int& menu); void ShowHelpPersonalize(); void ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget *pin_widget); - void ShowUserMenu(CMenuWidget* p_widget, std::vector v_umenu); + void ShowUserMenu(CMenuWidget* p_widget, std::vector &v_umenu); void ShowPluginMenu(CMenuWidget* p_widget); void ShowPreverredKeySetup(CMenuWidget* p_widget); void SaveAndExit();