示例#1
0
void wxAppBase::CleanUp()
{
    // 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();

    wxStockGDI::DeleteAll();

    wxDeleteStockLists();

    wxDELETE(wxTheColourDatabase);

    wxAppConsole::CleanUp();
}
示例#2
0
void wxAppBase::CleanUp()
{
    // Clean up any still pending objects. Normally there shouldn't any as we
    // already do this in OnExit(), but this could happen if the user code has
    // somehow managed to create more of them since then or just forgot to call
    // the base class OnExit().
    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();

    wxStockGDI::DeleteAll();

    wxDeleteStockLists();

    wxDELETE(wxTheColourDatabase);

    wxAppConsole::CleanUp();
}
示例#3
0
void wxAppBase::CleanUp()
{
    // 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();

    wxStockGDI::DeleteAll();

    wxDeleteStockLists();

    delete wxTheColourDatabase;
    wxTheColourDatabase = NULL;

    delete wxPendingEvents;
    wxPendingEvents = NULL;

#if wxUSE_THREADS
    delete wxPendingEventsLocker;
    wxPendingEventsLocker = NULL;

    #if wxUSE_VALIDATORS
        // If we don't do the following, we get an apparent memory leak.
        ((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
    #endif // wxUSE_VALIDATORS
#endif // wxUSE_THREADS
}