LoadResource
LoadResource
Make sure that a purgeable resource is in memory Handle rHandle ; existing, valid handle to a resource Given an existing resource handle, this checks to see if it is still in memory,
and if not, the resource is loaded. You only need to use this for resources
tagged as purgeable OR after getting a NIL handle after previously calling
rHandle is a handle leading to some variable length resource data. This
return an error).
Notes: When a resource's resPurgeable attribute is set, the resource data may be
dumped in case of a memory shortage (see SetResAttrs). In that case, the handle's master pointer is set to NIL and the resource data is gone from
memory.
If you are using any such purgeable resources, you must call
. (may get purged at any time)
.
myStuff = ** myHandle; [TOKEN:12074] get some resource data */
If you modify such a resource and it gets purged, LoadResource reads in Another case where you may need this function is after calling
the resource map and deciding that you do want the data, use