Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!decwrl!apple!sun-barr!newstop!sun!argv From: argv@turnpike.Eng.Sun.COM (Dan Heller) Newsgroups: comp.windows.x.motif Subject: the "text" of an XmText Widget Message-ID: <140523@sun.Eng.Sun.COM> Date: 11 Aug 90 20:17:07 GMT Sender: news@sun.Eng.Sun.COM Organization: O'Reilly && Associates Lines: 21 Perhaps someone from osf and can answer this: When you set the text widget's "value", you don't need to keep around it's memory any longer, do you? I'm reasonably sure it copies it into internal data space, but I can't find anywhere in the source that does it. I do see places where it's copied into _temporary_ internal buffers but not into permanent space. The example programs that set the text's value use allocated space and they never free it, but: 1) they never get the previous text and free it before assigning the new text -- does XmText do that automatically? 2) I tried freeing the text immediately after setting the text's value and it works fine in many programs. I haven't seen a problem. Does this mean that my assumption is right that the XmText widget copies and manages its own text? -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.