#include <cafe/os/OSDynLoad.h> void OSDynLoad_Release(OSDynLoad_ModuleHandle aModuleHandle);
|aModuleHandle||Handle to the module to release.|
None. To determine whether
OSDynLoad_Release encountered an error situation, either the Cafe console output will inform you that there was an error or there will be a panic.
This function is used to release an RPL previously loaded into memory, or supplementally acquired. A module is not freed from memory until all references to it are released. The main module/program cannot be released.
It is a programmer error to use data or code from an RPL after it has been released.
OSDynLoad_Release does not necessarily release an RPL.
The OS keeps a reference count of each time an RPL is acquired and decreases the count when released.
The RPL gets released when the reference count reaches zero.
Not all RPLs can (or should) be released. The RPX cannot be unloaded. If an RPL is directly referenced by the RPX or another RPL, it cannot be released until all references to the RPL are released.
2013/05/08 Automated cleanup pass.
2011/03/11 Initial version.