]> Creatis software - bbtk.git/commitdiff
Correct some memory leaks
authorFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Fri, 4 Dec 2009 10:48:34 +0000 (10:48 +0000)
committerFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Fri, 4 Dec 2009 10:48:34 +0000 (10:48 +0000)
kernel/src/bbtkWxGUITextEditor.cxx
kernel/src/bbtkWxGUITextEditor.h

index 02096e5566c9791b9e7ed6f0f70b932fc236f933..d94d6bdc26d3ee872e70331127a6655d97d412c3 100644 (file)
@@ -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;
   }
   //================================================================
 
index 166a46f02743f58412abb7badaa90ec127da8699..e1a1a589a3c0fe254f43aeaf4f13834aa92366a3 100644 (file)
@@ -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;