Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hplabs!hplabsz!mayer From: mayer@hplabsz.HPL.HP.COM (Niels Mayer) Newsgroups: comp.windows.x.motif Subject: Re: the "text" of an XmText Widget Message-ID: <5817@hplabsz.HPL.HP.COM> Date: 17 Aug 90 01:40:31 GMT References: <140523@sun.Eng.Sun.COM> <14342@gouda.quad.com> Reply-To: mayer@hplabs.hp.com (Niels Mayer) Organization: Hewlett-Packard Labs, Software & Systems Lab, Palo Alto, CA. Lines: 20 Summary: Expires: Sender: Followup-To: In article <14342@gouda.quad.com> carl@quad1.quad.com (Carl Priddy) writes: >No you do NOT need to keep it around any longer. I believe, although I am not >sure and have no hope of finding it documented anywhere, that all widgets that >have string resources make copies of those strings. I too have experienced no >problems after free'ing up the memory that contained them after I have set >the values in the widgets. In theory, what you said is supposedly true. But.... in Motif 1.0, if you set XmNargv on an applicationShellWidgetClass instance to a recently malloc()'d argv and do XtFree(argv_copy) right after doing XtAppCreateShell(), you get a guaranteed core dump. If you free after doing XtRealizeWidget(), you don't.... >As to whether or not the widgets do the appropriate alloc and frees, one can >only hope. Leaks? What leaks? -- Niels "canary in a coal mine" Mayer.