Delete pending objects before destroying wxConfig during cleanup.

This allows these objects to save their state in wxConfig, as e.g. top level
windows using wxPersistenceManager do.

Closes #16397.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-10 16:51:11 +00:00
parent 8f8baa1de3
commit ed1e48b1ed
2 changed files with 8 additions and 1 deletions

View File

@@ -281,6 +281,10 @@ void wxAppConsoleBase::OnLaunched()
int wxAppConsoleBase::OnExit()
{
// Delete all pending objects first, they might use wxConfig to save their
// state during their destruction.
DeletePendingObjects();
#if wxUSE_CONFIG
// delete the config object if any (don't use Get() here, but Set()
// because Get() could create a new config object)