diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 2e1186e491..92daa00909 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -258,6 +258,12 @@ struct APP_KICAD : 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 + if( !program.OnPgmInit() ) { program.OnPgmExit();