#include "wx/ptr_scpd.h"
#if defined(__WXMSW__)
- #include "wx/msw/private.h" // includes windows.h for LOGFONT
+ #include "wx/msw/private.h" // includes windows.h for LOGFONT
#endif
#if wxUSE_FONTMAP
void wxAppBase::CleanUp()
{
- // one last chance for pending objects to be cleaned up
+ // clean up all the pending objects
DeletePendingObjects();
+ // and any remaining TLWs (they remove themselves from wxTopLevelWindows
+ // when destroyed, so iterate until none are left)
+ while ( !wxTopLevelWindows.empty() )
+ {
+ // do not use Destroy() here as it only puts the TLW in pending list
+ // but we want to delete them now
+ delete wxTopLevelWindows.GetFirst()->GetData();
+ }
+
+ // undo everything we did in Initialize() above
wxBitmap::CleanUpHandlers();
wxDeleteStockObjects();
#ifdef __WXUNIVERSAL__
{
wxCMD_LINE_OPTION,
- _T(""),
+ wxEmptyString,
OPTION_THEME,
gettext_noop("specify the theme to use"),
wxCMD_LINE_VAL_STRING,
// and not mgl/app.cpp
{
wxCMD_LINE_OPTION,
- _T(""),
+ wxEmptyString,
OPTION_MODE,
gettext_noop("specify display mode to use (e.g. 640x480-16)"),
wxCMD_LINE_VAL_STRING,
// terminator
{
wxCMD_LINE_NONE,
- _T(""),
- _T(""),
- _T(""),
+ wxEmptyString,
+ wxEmptyString,
+ wxEmptyString,
wxCMD_LINE_VAL_NONE,
0x0
}