Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!osf.org!dbrooks From: dbrooks@osf.org Newsgroups: comp.windows.x.motif Subject: Re: Memory Leak in Motif 1.0 Dialog Widgets (Interactive port) Message-ID: <9010021752.AA16081@osf.osf.org> Date: 2 Oct 90 17:53:02 GMT References: <34367@cup.portal.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 16 Bruce Ong posted a program that has a memory leak. It involved continually re-Setting the items and itemCount of a Selectionbox. First the good news; it doesn't seem to leak in 1.1. Two changes you can make to the posted program. First, there is still a leak in XmStringCreateLtoR in 1.0.3. The example program is helped by only creating the string once at startup. Second, the best thing you can do about this particular case is use the XmListDeletePos and XmListAddItem calls, instead of updating the resources directly (use XmSelectionBoxGetChild to find the list). David Brooks Systems Engineering Open Software Foundation