MCPcopy Create free account
hub / github.com/audacity/audacity / Destroy

Method Destroy

src/toolbars/ToolManager.cpp:485–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483//
484
485void ToolManager::Destroy()
486{
487 if ( mTopDock || mBotDock ) { // destroy at most once
488 wxEvtHandler::RemoveFilter(this);
489
490 // Save the toolbar states
491 WriteConfig();
492
493 // This function causes the toolbars to be destroyed, so
494 // clear the configuration of the ToolDocks which refer to
495 // these toolbars. This change was needed to stop Audacity
496 // crashing when running with Jaws on Windows 10 1703.
497 mTopDock->GetConfiguration().Clear();
498 mBotDock->GetConfiguration().Clear();
499
500 mTopDock = mBotDock = nullptr; // indicate that it has been destroyed
501
502 for (auto &pair : mBars)
503 pair.second.reset();
504
505 mIndicator.reset();
506 mMenuManagerSubscription.Reset();
507 }
508}
509
510ToolManager::~ToolManager()
511{

Callers 7

CreateWindowsMethod · 0.45
ResetMethod · 0.45
OnMouseMethod · 0.45
HandleEscapeKeyMethod · 0.45
SetNameMethod · 0.45
NotifyMenuMethod · 0.45
OnRemoveClickedMethod · 0.45

Calls 3

ClearMethod · 0.45
resetMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected