Luna::free_library

void free_library(opaque_t handle)

Unloads the specified library.

Parameters

Remark

The library handle is reference counted: every call to load_library for the same library file increases the reference counter, and every free_library for the same library handle decreases the reference counter. The library will be removed from the process's address space when the reference counter drop to 0.

When one library is removed from the process's address space, it will decrease reference counters for all its dependent libraries, and removes them as well if their reference counters drop to 0.