Turn off the leak dumping under MSVC as wxWidgets causes it to falsely report dumps on exit

This commit is contained in:
Marek Roszko 2020-10-05 21:48:24 -04:00 committed by Mark Roszko
parent 2b839c6c9c
commit 2b2e8552be
1 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,12 @@ struct APP_SINGLE_TOP : public wxApp
bool OnInit() override
{
#if defined( _MSC_VER ) && defined( DEBUG )
// wxWidgets turns on leak dumping in debug but its "flawed" and will falsely dump for half a hour
// _CRTDBG_ALLOC_MEM_DF is the usual default for MSVC
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF );
#endif
// Force wxHtmlWinParser initialization when a wxHtmlWindow is used only
// in a shared modules (.so or .dll file)
// Otherwise the Html text is displayed as plain text.