Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph Swick) Newsgroups: comp.windows.x Subject: Re: Xt and the Destroy method Message-ID: <9008081235.AA18633@lyre.MIT.EDU> Date: 8 Aug 90 12:35:25 GMT References: Sender: daemon@athena.mit.edu (Mr Background) Organization: DEC/MIT Project Athena Lines: 16 If I call XtDestroyWidget on the top level widget, and call this during my exit routine, everything dies nicely, except that the Destroy method is NOT called. If I try XtDestroyWidget directly on the widget, and not going through the top level, the same thing happens. Don't forget that widget destruction happens in 2 phases. If you call XtDestroyWidget while XtDispatchEvent is active the cleanup is deferred until the very last stage of XtDispatchEvent, just before it returns. If the application exits before returning to XtDispatchEvent then the destroy methods will never be invoked. This is done so that applications can write callback procedures and action procedures without having to worry about data structures disappearing from underneath them.