improved memory liberation (explicitly set to NULL after delete)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-06-23 17:22:54 +00:00
parent d208e6412a
commit f5bb225133
20 changed files with 140 additions and 80 deletions

View File

@@ -99,7 +99,7 @@ public:
{
if ( m_locked > 0 )
{
wxLogDebug(_T("Warning: freeing a locked mutex (%d locks)."), m_locked);
wxLogDebug(_T("Warning: freeing a locked mutex (%ld locks)."), m_locked);
}
}
@@ -576,7 +576,10 @@ wxThread::wxThread(wxThreadKind kind)
wxThread::~wxThread()
{
s_threads.Remove( (void*) this ) ;
delete m_internal;
if (m_internal != NULL) {
delete m_internal;
m_internal = NULL;
}
}
// create/start thread