[wxPython-users] calling wx.CallAfter after wx.Frame.Destroy

Aaron Brady castironpi at comcast.net
Mon Jan 21 12:20:41 PST 2008


> -----Original Message-----
> From: Robin Dunn [mailto:robin at 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.

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?




More information about the wxpython-users mailing list