Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!ncar!asuvax!hrc!uucs1!gaf From: gaf@uucs1.UUCP (gaf) Newsgroups: comp.windows.x.motif Subject: When to free XmStrings? Message-ID: <361@uucs1.UUCP> Date: 6 Dec 90 00:14:00 GMT Reply-To: gaf@uucs1.UUCP () Organization: UUCS inc., Phoenix Az Lines: 16 One of the things about Motif which has never been clear to me is under what conditions I'm expected to free memory which a library function has allocated. Should I free the result of an XmStringCreateLtoR() or an XmStringGetLtoR()? Does it matter whether I use free() or XmStringFree()? When I call XtSetValues() to set or change some XmString resource, can I free the XmString immediately afterward (i.e. do the library functions always make a copy of what I pass) or hang onto it forever? And, finally, why does nobody offer Motif classes at reasonable prices :-). (A few thousand a head plus T&L is too much for little companies like us) -- Guy Finney It's that feeling of deja-vu UUCS inc. Phoenix, Az all over again. ncar!noao!asuvax!hrc!uucs1!gaf sun!sunburn!gtx!uucs1!gaf