Close a shared object
#include <dlfcn.h> int dlclose( void *handle );
- A handle for a shared object, returned by dlopen().
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The dlclose() function disassociates a shared object opened by dlopen() from the calling process. An object's symbols are no longer available after it's been closed with dlclose(). All objects loaded as a result of the closed objects dependencies are also closed.
The handle argument is the value returned by a previous call to dlopen().
0 for success, or a nonzero value if an error occurs.
If an error occurs, more detailed diagnostic information is available from dlerror().
An object won't be removed from the address space until all references to that object (via dlopen() or dependencies from other objects) have been closed.
Referencing a symbol in a closed object can cause undefined behavior.