Also call wxAuiManager::UnInit() when manager itself is destroyed

This completes the changes of the previous commit and should ensure that
UnInit() is always called, whoever is destroyed first -- the managed
window or the manager itself.

Also update the documentation to mention that calling UnInit()
explicitly is not necessary any longer.
This commit is contained in:
Vadim Zeitlin
2020-07-18 17:51:41 +02:00
parent f646532889
commit ceb21d5e86
3 changed files with 12 additions and 15 deletions

View File

@@ -116,8 +116,6 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER);
~MyFrame();
wxAuiDockArt* GetDockArt();
void DoUpdate();
@@ -1016,11 +1014,6 @@ MyFrame::MyFrame(wxWindow* parent,
m_mgr.Update();
}
MyFrame::~MyFrame()
{
m_mgr.UnInit();
}
wxAuiDockArt* MyFrame::GetDockArt()
{
return m_mgr.GetArtProvider();