🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.open-look
Article #2852

Re: Mem leaks in Xview?

#2852
From: Alex Laney
Date: Fri, 08 Jan 1993 19:20
42 lines
1958 bytes
Buzz Moschetti (buzz@bear.com) wrote:
: If you hope to see your process memory usage drop by 4k when you
: deallocate during PANEL_LIST_DELETE, you won't.  Memory allocated by the
: process cannot be returned to the pool -- that's Un*x, not X or XView.

But why doesn't it get re-used? Someone else has mentioned to me that
X11R4 leaks memory. How about X11R5?

To the previous poster:

That wasn't the actual code, I always null terminate xv_set() calls.

And an OH YES (OY):

The mem leak occurs (or is more pronounced) when I use the
PANEL_LIST_FONT attribute:

xv_set(list,
       PANEL_LIST_INSERT, i, 
       PANEL_LIST_FONT, i, fixed_font, 
       PANEL_LIST_STRING, i, string, 0);

later, when the string data changes I do:

xv_set(list,
       PANEL_LIST_STRING, i, string, 0);

And the mem allocated jumps by 4k approx.

I can't convince the powers that be to get a source copy of the XView
toolkit. If only to look at what's going on internally. My guess is the
process of drawing/allocating pixmaps/whatever is messed up. They are not
being re-used.

I can understand that the list is not designed for dynamic data like this, but
what else is there in XView?

--
Opinions expressed are my own, and are not necessarily those of Bell,BCE,etc.,
or any corporation, agency or association I may be affiliated with.
  Alex Laney, Independent User Interface Guru, IWS/TRACS Project.
  Addr: xela@pinetree.org
Technical Details
Message-ID: <C0Jv1n.5BI@animal.er.bell.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!torn!utzoo!censor!animal!alex
References: <BUZZ.93Jan6090422@lion.bear.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.open-look,alt.toolkits.xview
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!torn!utzoo!censor!animal!alex
From: alex@animal.Bell.CA (Alex Laney)
Subject: Re: Mem leaks in Xview?
Message-ID: <C0Jv1n.5BI@animal.er.bell.ca>
Followup-To: comp.windows.open-look,alt.toolkits.xview
Sender: news@animal.er.bell.ca
Organization: Bell Canada, Ottawa, Ontario
X-Newsreader: TIN [version 1.1 PL8]
References: <BUZZ.93Jan6090422@lion.bear.com>
Date: Fri, 8 Jan 1993 19:20:11 GMT
Lines: 42