Fixed memory leak in listbox, fixed memory leak reporting in app.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -548,7 +548,7 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
// check for memory leaks
|
// check for memory leaks
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#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"));
|
wxLogDebug(wxT("There were memory leaks.\n"));
|
||||||
wxDebugContext::Dump();
|
wxDebugContext::Dump();
|
||||||
|
@@ -361,6 +361,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
wxListBox::~wxListBox()
|
wxListBox::~wxListBox()
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
|
if (m_strings)
|
||||||
|
delete m_strings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||||
|
@@ -548,7 +548,7 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
// check for memory leaks
|
// check for memory leaks
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#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"));
|
wxLogDebug(wxT("There were memory leaks.\n"));
|
||||||
wxDebugContext::Dump();
|
wxDebugContext::Dump();
|
||||||
|
@@ -361,6 +361,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
wxListBox::~wxListBox()
|
wxListBox::~wxListBox()
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
|
if (m_strings)
|
||||||
|
delete m_strings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||||
|
Reference in New Issue
Block a user