1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-16 08:34:10 +02:00

One more safenew for the logger object

This commit is contained in:
Paul Licameli 2016-08-12 21:15:50 -04:00
parent 2024c8b319
commit bf1e8a1227

View File

@ -1174,7 +1174,11 @@ bool AudacityApp::OnInit()
// Ensure we have an event loop during initialization
wxEventLoopGuarantor eventLoop;
std::unique_ptr < wxLog > { wxLog::SetActiveTarget(new AudacityLogger) }; // DELETE
// wxWidgets will clean up the logger for the main thread, so we can say
// safenew. See:
// http://docs.wxwidgets.org/3.0/classwx_log.html#a2525bf54fa3f31dc50e6e3cd8651e71d
std::unique_ptr < wxLog >
{ wxLog::SetActiveTarget(safenew AudacityLogger) }; // DELETE old
mLocale = NULL;