]> git.saurik.com Git - apple/dyld.git/blob - doc/man/man3/dlclose.3
dyld-43.tar.gz
[apple/dyld.git] / doc / man / man3 / dlclose.3
1 .Dd Sept 25, 2004
2 .Dt DLCLOSE 3
3 .Sh NAME
4 .Nm dlclose
5 .Nd close a dynamic library or bundle
6 .Sh SYNOPSIS
7 .In dlfcn.h
8 .Ft int
9 .Fn dlclose "void* handle"
10 .Sh DESCRIPTION
11 .Fn dlclose
12 releases a reference to the dynamic library or bundle referenced by
13 .Fa handle .
14 If the reference count drops to 0, the bundle is removed from the
15 address space, and
16 .Fa handle
17 is rendered invalid.
18 Just before removing a dynamic library or bundle in this way, any
19 termination routines in it are called.
20 .Fa handle
21 is the value returned by a previous call to dlopen.
22 .Sh RETURN VALUES
23 If
24 .Fn dlclose
25 is successful, it returns a value of 0.
26 Otherwise it returns -1, and sets an error string that can be
27 retrived with
28 .Fn dlerror .
29 .Pp
30 .Sh SEE ALSO
31 .Xr dlopen 3
32 .Xr dlsym 3
33 .Xr dlerror 3
34 .Xr dyld 3
35 .Xr NSModule 3
36 .Xr NSObjectFileImage 3
37 .Xr ld 1
38 .Xr cc 1