How to catch when a window is destroyed

This is probably foolishly simple, so don't laugh.

How do I catch when a (unmanaged) window is destroyed? I still
want to interact with the C++ object, so I don't think I can
use __del__.

···

--
Paul

Paul McNett wrote:

This is probably foolishly simple, so don't laugh.

How do I catch when a (unmanaged) window is destroyed? I still want to interact with the C++ object, so I don't think I can use __del__.

Try EVT_WINDOW_DESTROY, but be careful, on some platforms the C++ instance is already in the process of being destroyed so you may run into problems if you try to do too much with it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!