calling wx.CallAfter after wx.Frame.Destroy

Will MainLoop exit if other events are added to the event queue after or
during delete, or will it address those first? IOW in other words, when
does it return?

If one calls CallAfter while or after the pending delete queue is being
processed, are further references are invalid?

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Monday, January 21, 2008 12:20 PM

Aaron Brady wrote:
> What if we call wx.CallAfter after calling frame.Destroy, where frame is
the
> only wx.Frame created? I.e., does MainLoop return, after top-level
windows
> are destroyed, without the event queue being empty?

For top-level windows the Destroy method doesn't actually destroy the
window immediately, instead it is added to a pending delete queue which
is processed in idle time, which will happen after the pending events
are processed.