From: Frederic Cervenansky Date: Fri, 4 Dec 2009 10:48:34 +0000 (+0000) Subject: Correct some memory leaks X-Git-Tag: CREATOOLS.2-0-3~113 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=06177c2be47f0a558100b98256be4d639e90a069;p=bbtk.git Correct some memory leaks --- diff --git a/kernel/src/bbtkWxGUITextEditor.cxx b/kernel/src/bbtkWxGUITextEditor.cxx index 02096e5..d94d6bd 100644 --- a/kernel/src/bbtkWxGUITextEditor.cxx +++ b/kernel/src/bbtkWxGUITextEditor.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUITextEditor.cxx,v $ Language: C++ - Date: $Date: 2009/05/28 08:12:07 $ - Version: $Revision: 1.20 $ + Date: $Date: 2009/12/04 10:48:34 $ + Version: $Revision: 1.21 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -170,14 +170,14 @@ namespace bbtk // | wxTAB_TRAVERSAL ); */ - wxFont* FixedFont = new wxFont(10, + mFixedFont = new wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false); mwxInputTextAttr = new wxTextAttr; - mwxInputTextAttr->SetFont(*FixedFont); + mwxInputTextAttr->SetFont(*mFixedFont); sizer->Add(mwxInputText,1,wxGROW); SetSizer(sizer); @@ -189,6 +189,8 @@ namespace bbtk //================================================================ WxGUITextEditorPage::~WxGUITextEditorPage() { + delete mwxInputTextAttr; + delete mFixedFont; } //================================================================ diff --git a/kernel/src/bbtkWxGUITextEditor.h b/kernel/src/bbtkWxGUITextEditor.h index 166a46f..e1a1a58 100644 --- a/kernel/src/bbtkWxGUITextEditor.h +++ b/kernel/src/bbtkWxGUITextEditor.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUITextEditor.h,v $ Language: C++ - Date: $Date: 2009/04/15 15:45:50 $ - Version: $Revision: 1.9 $ + Date: $Date: 2009/12/04 10:48:34 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -110,6 +110,7 @@ namespace bbtk WxGUITextEditor* mEditor; WxTextCtrlGettingKeyEvents* mwxInputText; wxTextAttr* mwxInputTextAttr; + wxFont* mFixedFont; std::string mName; bool mAskFilename;