[futurebasic] When to call RELEASERESOURCE

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: wave@... (M Goodes)
Date: Fri, 5 Dec 1997 09:15:24 -0500
Rick said:
>Theoretically, you should never need to call RELEASERESOURCE _if_ the
>resource in question is designated as purgeable.  If that's the case,
>then the Resource Manager (or the Memory Manager?) will purge the
>resource from memory if it should become necessary to reclaim that
>memory for other purposes.

I'm in the habit of clearing my memory blocks as soon as I'm finished with
them.  The above information raises a couple of questions (here I'm
assuming we are using a res handle unique to our use that no one else will
be using):
1.   What happens if you call RELEASERESOURCE on a handle that's designated
as non-purgeable?  Will it still release the handle from memory?
2.   What happens if you call RELEASERESOURCE on a handle that's already
been purged?  Will your system crash or will you just get an osErr?
TIA.

____________________
Use e-mail with integrity.
Mark Goodes (wave@...)