From a64099529882a8cf2453b5121768a94ff5f3588a Mon Sep 17 00:00:00 2001 From: thunder2 Date: Fri, 7 May 2010 23:58:17 +0000 Subject: [PATCH] Memomry leak: - Member _settings on some settings pages was not deleted git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2864 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/settings/AppearancePage.cpp | 5 +++++ retroshare-gui/src/gui/settings/AppearancePage.h | 2 +- retroshare-gui/src/gui/settings/CryptoPage.cpp | 5 +++++ retroshare-gui/src/gui/settings/CryptoPage.h | 2 +- retroshare-gui/src/gui/settings/GeneralPage.cpp | 4 ++-- retroshare-gui/src/gui/settings/GeneralPage.h | 2 +- retroshare-gui/src/gui/settings/NotifyPage.cpp | 5 +++++ retroshare-gui/src/gui/settings/NotifyPage.h | 2 +- retroshare-gui/src/gui/settings/SoundPage.cpp | 5 +++++ retroshare-gui/src/gui/settings/SoundPage.h | 2 +- 10 files changed, 27 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/settings/AppearancePage.cpp b/retroshare-gui/src/gui/settings/AppearancePage.cpp index cc342a2af..fc395520e 100755 --- a/retroshare-gui/src/gui/settings/AppearancePage.cpp +++ b/retroshare-gui/src/gui/settings/AppearancePage.cpp @@ -59,6 +59,11 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WFlags flags) #endif } +AppearancePage::~AppearancePage() +{ + delete _settings; +} + /** Saves the changes on this page */ bool AppearancePage::save(QString &errmsg) diff --git a/retroshare-gui/src/gui/settings/AppearancePage.h b/retroshare-gui/src/gui/settings/AppearancePage.h index c2fb91dd3..3e0b12024 100755 --- a/retroshare-gui/src/gui/settings/AppearancePage.h +++ b/retroshare-gui/src/gui/settings/AppearancePage.h @@ -40,7 +40,7 @@ class AppearancePage : public ConfigPage /** Default Constructor */ AppearancePage(QWidget * parent = 0, Qt::WFlags flags = 0); /** Default Destructor */ - ~AppearancePage() {} + ~AppearancePage(); /** Saves the changes on this page */ bool save(QString &errmsg); diff --git a/retroshare-gui/src/gui/settings/CryptoPage.cpp b/retroshare-gui/src/gui/settings/CryptoPage.cpp index 09d0e29d9..e166377f5 100755 --- a/retroshare-gui/src/gui/settings/CryptoPage.cpp +++ b/retroshare-gui/src/gui/settings/CryptoPage.cpp @@ -55,6 +55,11 @@ CryptoPage::CryptoPage(QWidget * parent, Qt::WFlags flags) #endif } +CryptoPage::~CryptoPage() +{ + delete _settings; +} + void CryptoPage::closeEvent (QCloseEvent * event) { diff --git a/retroshare-gui/src/gui/settings/CryptoPage.h b/retroshare-gui/src/gui/settings/CryptoPage.h index 5d219abd0..303b4f98f 100755 --- a/retroshare-gui/src/gui/settings/CryptoPage.h +++ b/retroshare-gui/src/gui/settings/CryptoPage.h @@ -39,7 +39,7 @@ class CryptoPage : public ConfigPage /** Default Constructor */ CryptoPage(QWidget * parent = 0, Qt::WFlags flags = 0); /** Default Destructor */ - ~CryptoPage() {} + ~CryptoPage(); /** Saves the changes on this page */ diff --git a/retroshare-gui/src/gui/settings/GeneralPage.cpp b/retroshare-gui/src/gui/settings/GeneralPage.cpp index b65063a05..52df25fa5 100755 --- a/retroshare-gui/src/gui/settings/GeneralPage.cpp +++ b/retroshare-gui/src/gui/settings/GeneralPage.cpp @@ -49,10 +49,10 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WFlags flags) } /** Destructor */ -/*GeneralPage::~GeneralPage() +GeneralPage::~GeneralPage() { delete _settings; -}*/ +} /** Saves the changes on this page */ bool diff --git a/retroshare-gui/src/gui/settings/GeneralPage.h b/retroshare-gui/src/gui/settings/GeneralPage.h index a95ef8e4a..6efb29f58 100755 --- a/retroshare-gui/src/gui/settings/GeneralPage.h +++ b/retroshare-gui/src/gui/settings/GeneralPage.h @@ -42,7 +42,7 @@ public: /** Default Constructor */ GeneralPage(QWidget * parent = 0, Qt::WFlags flags = 0); /** Default Destructor */ - ~GeneralPage() {} + ~GeneralPage(); /** Saves the changes on this page */ bool save(QString &errmsg); diff --git a/retroshare-gui/src/gui/settings/NotifyPage.cpp b/retroshare-gui/src/gui/settings/NotifyPage.cpp index e77bb3e7e..cd0bb293c 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.cpp +++ b/retroshare-gui/src/gui/settings/NotifyPage.cpp @@ -55,6 +55,11 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WFlags flags) #endif } +NotifyPage::~NotifyPage() +{ + delete _settings; +} + void NotifyPage::closeEvent (QCloseEvent * event) { diff --git a/retroshare-gui/src/gui/settings/NotifyPage.h b/retroshare-gui/src/gui/settings/NotifyPage.h index 2df729f92..51ca7a5c5 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.h +++ b/retroshare-gui/src/gui/settings/NotifyPage.h @@ -37,8 +37,8 @@ class NotifyPage : public ConfigPage public: /** Default Constructor */ NotifyPage(QWidget * parent = 0, Qt::WFlags flags = 0); - ~NotifyPage() {} /** Default Destructor */ + ~NotifyPage(); /** Saves the changes on this page */ bool save(QString &errmsg); diff --git a/retroshare-gui/src/gui/settings/SoundPage.cpp b/retroshare-gui/src/gui/settings/SoundPage.cpp index 06799c797..f009e33c2 100644 --- a/retroshare-gui/src/gui/settings/SoundPage.cpp +++ b/retroshare-gui/src/gui/settings/SoundPage.cpp @@ -50,6 +50,11 @@ SoundPage::SoundPage(QWidget * parent, Qt::WFlags flags) #endif } +SoundPage::~SoundPage() +{ + delete _settings; +} + /** Saves the changes on this page */ bool SoundPage::save(QString &errmsg) diff --git a/retroshare-gui/src/gui/settings/SoundPage.h b/retroshare-gui/src/gui/settings/SoundPage.h index 9ebff7c4f..0e27da229 100644 --- a/retroshare-gui/src/gui/settings/SoundPage.h +++ b/retroshare-gui/src/gui/settings/SoundPage.h @@ -37,7 +37,7 @@ public: /** Default Constructor */ SoundPage(QWidget * parent = 0, Qt::WFlags flags = 0); /** Default Destructor */ - ~SoundPage() {} + ~SoundPage(); /** Saves the changes on this page */ bool save(QString &errmsg);