🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #23000

Re: Purgable blocks in the heap

#23000
From: Jerry Whitnell
Date: Thu, 17 Dec 1987 19:52
25 lines
1467 bytes
In article <1987Dec15.143915.593@mntgfx.mentor.com> tomc@mntgfx.mentor.com (Tom Carstensen) writes:
>My question is, is it necessary to call HNoPurge (for example)
>every time you call GetResource, or can you expect things
>loaded into the heap (like with GetResource) to at least be
>there until the next ROM call?

Only if you set the Purge bit on the resource itself.  As long as you don't,
the resource is not purgable and TMON won't purge it.  The problem
most applications have is they dereference the handle to get the
pointer and then call something then purges the handle.  

>
>Would a call like this be prone to this error:
>
>    DrawPicture(GetPicture(1000), &r);

Only if Resource PICT 1000 had the Purge bit set.

>
>: Tom Carstensen              Usenet: tomc@mntgfx.MENTOR.COM :

Jerry Whitnell				Lizzi Borden took an axe
Communication Solutions, Inc.		And plunged it deep into the VAX;
					Don't you envy people who
					Do all the things You want to do?
Technical Details
Message-ID: <1326@csib.csi.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ames!oliveb!epimass!csi!jwhitnel
References: <1987Dec15.143915.593@mntgfx.mentor.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ames!oliveb!epimass!csi!jwhitnel
From: jwhitnel@csi.UUCP (Jerry Whitnell)
Newsgroups: comp.sys.mac
Subject: Re: Purgable blocks in the heap
Message-ID: <1326@csib.csi.UUCP>
Date: 17 Dec 87 19:52:13 GMT
References: <1987Dec15.143915.593@mntgfx.mentor.com>
Reply-To: jwhitnel@csib.UUCP (Jerry Whitnell)
Organization: Communications Solutions Inc., San Jose, Ca
Lines: 25
Keywords: HPurge HNoPurge heap resources