Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!thyme!kaleb From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley ) Newsgroups: comp.windows.x Subject: Re: XmString Question Message-ID: <1990Dec4.160813.1566@thyme.jpl.nasa.gov> Date: 4 Dec 90 16:08:13 GMT References: <502@zok.UUCP> <917@stewart.UUCP> Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 19 In article <917@stewart.UUCP> jerry@stewart.UUCP (Jerry Shekhel) writes: > > XtSetArg(arg, XmNlabelString, &str); > XtGetValues(w1, &arg, 1); > XtSetArg(arg, XmNmessageString /* or whatever */, str); > XtSetValues(w2, &arg, 1); > >This seems to work. My question: does 'str' have to be deallocated at this >point? That is, did XtGetValues() create an entire new instance of the >XmString? Does XtSetValues() create an internal instance of the XmString, >or does it just set up pointers to 'str'? Please help if you can. Yes, yes, and yes. XmStringFree(str) after the XtSetValues(). -- Kaleb Keithley Jet Propulsion Labs kaleb@thyme.jpl.nasa.gov Good girls get to go to heaven, but bad girls get to go everywhere!