Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!lgc.com!usenet From: asokan@lgc.com (Asokan Manohar) Newsgroups: comp.windows.x.motif Subject: Free motif resources got by XtGetValues ??? Message-ID: <1991Jun17.172902.13080@lgc.com> Date: 17 Jun 91 17:29:02 GMT Sender: usenet@lgc.com Organization: Landmark Graphics Corp., Houston, Tx Lines: 29 Nntp-Posting-Host: sparky.lgc.com Hi Netters: I am keen to know if XtGetValues allocates memory for motif resources, which needs to be freed by the calling application. Consider the following example... XmStringTable xmstr; int n = 0, tot; Arg args[2]; XtSetArg(args[n], XmNitems, &xmstr); n++; XtSetArg(args[n], XmNitemCount, &tot); n++; /* # of items */ XtGetValues(list_wdg, wargs, n); Is it correct to free as next ? while(tot) { XmStringFree(xmstr[tot-1]); tot--; } XtFree(xmstr); Thx a lot for replying ! e mail: asokan@lgc.com -- Overflow on /dev/null; Please empty the bit bucket