DLCLOSE(3)

NAME
dlclose - close a dynamic library or bundle

SYNOPSIS
#include <dlfcn.h>
int
dlclose(void* handle);

DESCRIPTION
dlclose() releases a reference to the dynamic library or bundle referenced by handle. If the reference count drops to 0, the bundle is removed from the address space, and handle is rendered invalid. Just before removing a dynamic library or bundle in this way, any termination routines in it are called. handle is the value returned by a previous call to dlopen.

RETURN VALUES
If dlclose() is successful, it returns a value of 0. Otherwise it returns -1, and sets an error string that can be retrived with dlerror().

SEE ALSO
dlopen(3) dlsym(3) dlerror(3) dyld(3) NSModule(3) NSObjectFileImage(3) ld(1) cc(1)