Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!alphalpha.com!nazgul From: nazgul@alphalpha.com (Kee Hinckley) Newsgroups: comp.windows.x.motif Subject: Re: XtDestroyWidget & Gadgets Message-ID: <901012171654.11385@alphalpha> Date: 12 Oct 90 21:16:54 GMT References: <9010111926.AA01346@crc.skl.dnd.ca> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 26 > As an aside, I haven't seen any info in the Motif docs regarding the > when's & why's of destroying widgets. What I've been doing is keeping In 1.0 you almost always crash when you destroy widgets. Much better to just unmange (or for dialogs, unmap) them and reuse them later. Even if you don't crash you'll probably leak memory like crazy. In all fairness this isn't completely Motif's fault, there are lots of problems in the Intrinsics as well. In 1.1, with patchlevel 16 or so of Xt, things are much better. There seem to be no major leaks on deletion (I've seen some when I override translations in my program, but I think it's an Intrinsics bug and I haven't had time to track it down for sure). There are a couple places where Motif is referencing just deleted widgets but those are rarely fatal and should be fixed in 1.1.1. However. I don't know how fast your machines are, but caching windows and even dialogs can make huge differences in speed, so even without leaks and bugs I think it's well worth it if you can. A side question here. Is there anyone on the motif list who is using 1.1 and isn't a OSF support customer (and thus on motif-talk)? I've been assuming it hasn't filtered out into binary-only form yet, but I could be wrong.