🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13450

Re: Mem eating

#13450
From: Bill Turner
Date: Fri, 13 Jan 1989 18:33
21 lines
1433 bytes
>An aplication I am writing seems to be holding 20K or so after the program 
>terminates (as checked by command window aboutbox).  I was careful about 
>dealocating my pens and brushes,...

Any fonts you've allocated and not freed?  Only thing I can think of right
off that could be that large...

> PS what is the difference between Local/GlobalFree and Local/GlobalDiscard?
> The man page for both says it returns memory to the heap, so what's the 
> difference?

Free returns the memory to the heap and invalidates the handle.  Discard
returns the memory, but the handle is still valid.  Normally, this is only
used internally for (GL)MEM_DISCARDABLE, where the memory can be discarded
without invalidating the handle.  This can be quite useful for read-only
data that can be retrieved from disc -- in fact, this is how discardable
code and resources are done.  I haven't seen any situations where you
would want to explicitly call Local/GlobalDiscard, since the system should
know better when to throw away memory.

--Bill Turner
Technical Details
Message-ID: <106580018@hpcvlx.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hp-pcd!hpcvlx!bturner
References: <33587@grapevine.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hp-pcd!hpcvlx!bturner
From: bturner@hpcvlx.HP.COM (Bill Turner)
Newsgroups: comp.windows.ms
Subject: Re: Mem eating
Message-ID: <106580018@hpcvlx.HP.COM>
Date: 13 Jan 89 18:33:16 GMT
References: <33587@grapevine.uucp>
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Lines: 21