fixed wxDebugContext to work with global and static objects (patch 901031)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-02-28 23:57:54 +00:00
parent 121680bff0
commit ced5554416
3 changed files with 102 additions and 32 deletions

View File

@@ -338,16 +338,7 @@ static void DoCommonPostCleanup()
FreeConvertedArgs();
#endif // wxUSE_UNICODE
// check for memory leaks
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
{
wxLogDebug(wxT("There were memory leaks.\n"));
wxDebugContext::Dump();
wxDebugContext::PrintStatistics();
}
#endif // Debug
// Note: check for memory leaks is now done via wxDebugContextDumpDelayCounter
#if wxUSE_LOG
// and now delete the last logger as well
delete wxLog::SetActiveTarget(NULL);