Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17754

Modified Files:
        Tags.cpp Tags.h 
Log Message:
Fix memleak.

Index: Tags.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Tags.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Tags.h      13 Jan 2009 02:01:28 -0000      1.16
+++ Tags.h      23 Mar 2009 22:20:06 -0000      1.17
@@ -48,6 +48,7 @@
 class Grid;
 class ShuttleGui;
 class TagsEditor;
+class ComboEditor;
 
 WX_DECLARE_STRING_HASH_MAP(wxString, TagMap);
 
@@ -161,6 +162,8 @@
    Tags mLocal;
 
    Grid *mGrid;
+   ComboEditor *mComboEditor;
+   wxGridCellStringRenderer *mStringRenderer;
 
    DECLARE_EVENT_TABLE()
 };

Index: Tags.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Tags.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- Tags.cpp    13 Jan 2009 02:01:28 -0000      1.66
+++ Tags.cpp    23 Mar 2009 22:20:05 -0000      1.67
@@ -766,6 +766,9 @@
 
 TagsEditor::~TagsEditor()
 {
+   delete mGrid;
+//   delete mStringRenderer;
+   delete mComboEditor;
 }
 
 void TagsEditor::PopulateOrExchange(ShuttleGui & S)
@@ -785,9 +788,10 @@
                           wxDefaultSize,
                           wxSUNKEN_BORDER);
 
-         mGrid->RegisterDataType(wxT("Combo"),
-                                 new wxGridCellStringRenderer,
-                                 new ComboEditor(wxArrayString(), true));
+         mStringRenderer = new wxGridCellStringRenderer;
+         mComboEditor = new ComboEditor(wxArrayString(), true);
+
+         mGrid->RegisterDataType(wxT("Combo"), mStringRenderer, mComboEditor);
 
          mGrid->SetColLabelSize(mGrid->GetDefaultRowSize());
 


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to