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

@@ -484,11 +484,12 @@ public:
void StartPaneDrag(wxWindow* paneWindow, const wxPoint& offset);
/**
Uninitializes the framework and should be called before a managed frame or
window is destroyed. UnInit() is usually called in the managed wxFrame's
destructor. It is necessary to call this function before the managed frame
or window is destroyed, otherwise the manager cannot remove its custom event
handlers from a window.
Dissociate the managed window from the manager.
This function may be called before the managed frame or window is
destroyed, but, since wxWidgets 3.1.4, it's unnecessary to call it
explicitly, as it will be called automatically when this window is
destroyed, as well as when the manager itself is.
*/
void UnInit();