Merge in main doc trunk.
[awesomized/libmemcached] / docs / man / memcached_free.3
1 .TH "MEMCACHED_FREE" "3" "April 08, 2011" "0.47" "libmemcached"
2 .SH NAME
3 memcached_free \- libmemcached Documentation
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .\" Man page generated from reStructeredText.
32 .
33 .sp
34 Create a memcached_st structure
35 .SH LIBRARY
36 .sp
37 C Client Library for memcached (libmemcached, \-lmemcached)
38 .SH SYNOPSIS
39 .sp
40 #include <libmemcached/memcached.h>
41 .INDENT 0.0
42 .TP
43 .B memcached_st *memcached_create (memcached_st *ptr);
44 .UNINDENT
45 .INDENT 0.0
46 .TP
47 .B void memcached_free (memcached_st *ptr);
48 .UNINDENT
49 .INDENT 0.0
50 .TP
51 .B memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
52 .UNINDENT
53 .INDENT 0.0
54 .TP
55 .B void memcached_servers_reset(memcached_st);
56 .UNINDENT
57 .SH DESCRIPTION
58 .sp
59 memcached_create() is used to create a \fBmemcached_st\fP structure that will then
60 be used by other libmemcached(3) functions to communicate with the server. You
61 should either pass a statically declared \fBmemcached_st\fP to memcached_create() or
62 a NULL. If a NULL passed in then a structure is allocated for you.
63 .sp
64 memcached_clone() is similar to memcached_create(3) but it copies the
65 defaults and list of servers from the source \fBmemcached_st\fP. If you pass a null as
66 the argument for the source to clone, it is the same as a call to memcached_create().
67 If the destination argument is NULL a \fBmemcached_st\fP will be allocated for you.
68 .sp
69 memcached_servers_reset() allows you to zero out the list of servers that
70 the memcached_st has.
71 .sp
72 To clean up memory associated with a \fBmemcached_st\fP structure you should pass
73 it to memcached_free() when you are finished using it. memcached_free() is
74 the only way to make sure all memory is deallocated when you finish using
75 the structure.
76 .sp
77 You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
78 stack based allocation. The most common issues related to ABI safety involve
79 heap allocated structures.
80 .SH RETURN
81 .sp
82 memcached_create() returns a pointer to the memcached_st that was created
83 (or initialized). On an allocation failure, it returns NULL.
84 .sp
85 memcached_clone() returns a pointer to the memcached_st that was created
86 (or initialized). On an allocation failure, it returns NULL.
87 .SH HOME
88 .sp
89 To find out more information please check:
90 \fI\%https://launchpad.net/libmemcached\fP
91 .SH AUTHOR
92 .sp
93 Brian Aker, <\fI\%brian@tangent.org\fP>
94 .SH SEE ALSO
95 .sp
96 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
97 .SH AUTHOR
98 Brian Aker
99 .SH COPYRIGHT
100 2011, Brian Aker DataDifferential, http://datadifferential.com/
101 .\" Generated by docutils manpage writer.
102 .\"
103 .