]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed memory leak in listbox, fixed memory leak reporting in app.cpp
authorJulian Smart <julian@anthemion.co.uk>
Fri, 8 Sep 2000 14:36:00 +0000 (14:36 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 8 Sep 2000 14:36:00 +0000 (14:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/app.cpp
src/gtk/listbox.cpp
src/gtk1/app.cpp
src/gtk1/listbox.cpp

index f4470521216389ff7abddc460032cf6a3dcaf03b..b452afc77adb23d03d08a6114623c815917e7099 100644 (file)
@@ -548,7 +548,7 @@ void wxApp::CleanUp()
 
     // check for memory leaks
 #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
-    if (wxDebugContext::CountObjectsLeft() > 0)
+    if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
     {
         wxLogDebug(wxT("There were memory leaks.\n"));
         wxDebugContext::Dump();
index 4412ded52af7575548f9f7953c7d3b7c1c3f551e..308faa01e1c4c99051149335004b2d82c9068d2f 100644 (file)
@@ -361,6 +361,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
 wxListBox::~wxListBox()
 {
     Clear();
+    if (m_strings)
+      delete m_strings;
 }
 
 void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
index f4470521216389ff7abddc460032cf6a3dcaf03b..b452afc77adb23d03d08a6114623c815917e7099 100644 (file)
@@ -548,7 +548,7 @@ void wxApp::CleanUp()
 
     // check for memory leaks
 #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
-    if (wxDebugContext::CountObjectsLeft() > 0)
+    if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
     {
         wxLogDebug(wxT("There were memory leaks.\n"));
         wxDebugContext::Dump();
index 4412ded52af7575548f9f7953c7d3b7c1c3f551e..308faa01e1c4c99051149335004b2d82c9068d2f 100644 (file)
@@ -361,6 +361,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
 wxListBox::~wxListBox()
 {
     Clear();
+    if (m_strings)
+      delete m_strings;
 }
 
 void wxListBox::DoInsertItems(const wxArrayString& items, int pos)