X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77c6966e11a7f9b9597bfaef7748b35380ddbf22..b0540bb8ba756e2df3479073d9f6d7c3373460c3:/src/common/init.cpp?ds=sidebyside diff --git a/src/common/init.cpp b/src/common/init.cpp index 3cc03374bc..2fd5771f04 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -206,8 +206,6 @@ static void FreeConvertedArgs() // initialization which is always done (not customizable) before wxApp creation static bool DoCommonPreInit() { - wxClassInfo::InitializeClasses(); - return true; } @@ -331,7 +329,7 @@ static void DoCommonPreCleanup() // cleanup done after destroying wxTheApp static void DoCommonPostCleanup() { - wxClassInfo::CleanUpClasses(); + wxClassInfo::CleanUp(); // we can't do this in wxApp itself because it doesn't know if argv had // been allocated @@ -339,6 +337,16 @@ 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 + #if wxUSE_LOG // and now delete the last logger as well delete wxLog::SetActiveTarget(NULL); @@ -361,17 +369,6 @@ void wxEntryCleanup() DoCommonPostCleanup(); - - // 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 - } // ----------------------------------------------------------------------------