When to call RELEASERESOURCE
Quote from Forum Archives on December 5, 1997, 9:15 amPosted by: wave <wave@...>
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@netcom.ca)
Posted by: wave <wave@...>
>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@netcom.ca)