dlclose() - close shared library object
#include <dlfcn.h>
dlclose(void *handle)
The dlclose(3) call dereferences the handle, closing the object it refers to. (The handle is returned by a dlopen(3) call, and is used to load a shared library object.)
After a call to dlclose(3), the handle is invalid and the object is no longer loaded. Any other objects loaded automatically (see dlopen(3)) are also no longer loaded.
References to a particular handle should be kept between the dlopen(3) and dlclose(3) calls that use that handle, since the handle may be reused and returned by a subsequent call to dlopen(3) that refers to a different object.
The dlclose(3) call returns 0 if the object is closed, and non-zero if the handle was invalid or if the object couldn't be closed. For more information about the cause of a non-zero return value, use dlerror(3).
dlerror(3)
dlopen(3)
dlsym(3)