[comp.windows.x.motif] Destroying widgets

ben@HPCVXBEN.CV.HP.COM (Benjamin Ellsworth) (07/26/90)

Mail bounced.  I'm hoping that the mailing list can reach this person.

To: laagel@medoc.inria.fr (F.Laagel)
Date: Mon, 23 Jul 90 18:11:23 PDT
In-Reply-To:  "F.Laagel" at Jul 19, 90 7:34 pm


> In article <100920237@hpcvlx.cv.hp.com> you ask me :
> 
>> Is your code getting back to XtMainLoop (or an analog) in between the
>> creations and the destructions?
> 
> The answer is no.

Then this is your problem.  If you don't return to DispatchEvent the
widget is never "freed."  Destruction is a two phase process.  When you
destroy a widget it is marked as being destroyed, and some things are
done to it, but the memory occupied by that widget is not freed until
the next event is processed.  Read the Xt Intrinsics manual (or source
;-) for more detail.

-----------------------------------------------------------------------
Benjamin Ellsworth      | ben@cv.hp.com                | INTERNET
Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP
1000 N.E. Circle        | (USA) (503) 750-4980         | FAX
Corvallis, OR 97330     | (USA) (503) 757-2000         | VOICE
-----------------------------------------------------------------------
                     All relevant disclaimers apply.
-----------------------------------------------------------------------