This article is from the Mac Programming FAQ, by Jon Watte firstname.lastname@example.org with numerous contributions by others.
Calling GetResource returns NULL if the resource is not found or
there is not enough memory, else it returns a handle to the resource.
This handle may be moved or locked like any other handle, but DO NOT
call DisposeHandle to get rid of a resource handle - call
ReleaseResource. DisposeResource (see above) will catch this kind of
Remember that AddResource makes a resource handle out of an ordinary
handle, and RemoveResource or DetachResource makes an ordinary handle
out of a resource handle. You cannot call AddResource with a resource
handle; you have to DetachResource it first.
Resource handles are automagically disposed when the resource file they
belong to is closed.