Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!pcad!rob From: rob@pcad.UUCP (Ralph Brown) Newsgroups: comp.windows.x.motif Subject: Re: Memory Leaks Summary: Yes, it's a problem Message-ID: <513@pcad.UUCP> Date: 24 Apr 91 14:06:26 GMT References: <692@esosun.UUCP> Organization: Personal CAD Systems, Westford, MA Lines: 23 In article <692@esosun.UUCP>, cynde@tyr.css.gov (Cynde Smith) writes: > We have a large application program running X and Motif that > appears to have consistent 'memory leaks' under certain conditions. > An example of a condition is the building of a popup-shell and > several associated child widgets, and immediately popping it > down with a 'done' button which invokes XtDestroyWidget() on the > popup. After cleaning up some of the leaks by explicitly freeing > all resources created with XmStringCreate() we're still losing > ~6K on each popup/popdown. It's never exactly the same amount. > > Has anyone experienced something similar before ? Our guess is > we may be overlooking a resource or environment setting. We've had the same problem in this and other cases of creating and destroying widgets on the fly. I believe this is a real bug in X. We got around it by keeping a library of menus and entries and managing them as needed. If a new one is used, it is created and kept around. Needless to say you need to keep some sort of indexing scheme so you can find out if you've got and entry you want. Ralph