~tangent-org/libmemcached/trunk

1015 by Continuous Integration
Merging lp:~brianaker/libmemcached/rpm-mkdir-fix to Build branch
1
.TH "MEMCACHED_FREE" "3" "May 31, 2012" "1.0.8" "libmemcached"
945 by Brian Aker
Merge Trunk
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
.SH SYNOPSIS
34
.sp
35
#include <libmemcached/memcached.h>
36
.INDENT 0.0
37
.TP
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
38
.B memcached_st
39
.UNINDENT
40
.INDENT 0.0
41
.TP
42
.B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
43
.UNINDENT
44
.INDENT 0.0
45
.TP
46
.B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
47
.UNINDENT
48
.INDENT 0.0
49
.TP
50
.B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
51
.UNINDENT
52
.INDENT 0.0
53
.TP
54
.B void memcached_servers_reset(\fI\%memcached_st\fP)
945 by Brian Aker
Merge Trunk
55
.UNINDENT
56
.sp
57
Compile and link with \-lmemcached
58
.SH DESCRIPTION
59
.sp
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
60
\fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
950 by Brian Aker
Update man pages.
61
structure that will then be used by other libmemcached(3) functions to
62
communicate with the server. You should either pass a statically declared
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
63
\fI\%memcached_st\fP to \fI\%memcached_create()\fP or
945 by Brian Aker
Merge Trunk
64
a NULL. If a NULL passed in then a structure is allocated for you.
65
.sp
950 by Brian Aker
Update man pages.
66
Please note, when you write new application use
1003.2.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
67
\fBmemcached()\fP over \fI\%memcached_create()\fP.
950 by Brian Aker
Update man pages.
68
.sp
69
\fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
70
it copies the defaults and list of servers from the source
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
71
\fI\%memcached_st\fP. If you pass a null as the argument for the source
950 by Brian Aker
Update man pages.
72
to clone, it is the same as a call to \fI\%memcached_create()\fP.
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
73
If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
950 by Brian Aker
Update man pages.
74
for you.
75
.sp
76
\fI\%memcached_servers_reset()\fP allows you to zero out the list of
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
77
servers that the \fI\%memcached_st\fP has.
950 by Brian Aker
Update man pages.
78
.sp
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
79
To clean up memory associated with a \fI\%memcached_st\fP structure you
950 by Brian Aker
Update man pages.
80
should pass it to \fI\%memcached_free()\fP when you are finished using it.
81
\fI\%memcached_free()\fP is the only way to make sure all memory is
82
deallocated when you finish using the structure.
945 by Brian Aker
Merge Trunk
83
.sp
84
You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
85
stack based allocation. The most common issues related to ABI safety involve
86
heap allocated structures.
87
.SH RETURN
88
.sp
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
89
\fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
950 by Brian Aker
Update man pages.
90
that was created (or initialized). On an allocation failure, it returns NULL.
945 by Brian Aker
Merge Trunk
91
.sp
990.1.1 by Continuous Integration
Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch
92
\fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
950 by Brian Aker
Update man pages.
93
that was created (or initialized). On an allocation failure, it returns NULL.
945 by Brian Aker
Merge Trunk
94
.SH HOME
95
.sp
96
To find out more information please check:
97
\fI\%http://libmemcached.org/\fP
98
.SH SEE ALSO
99
.sp
100
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
101
.SH AUTHOR
102
Brian Aker
103
.SH COPYRIGHT
104
2011, Brian Aker DataDifferential, http://datadifferential.com/
105
.\" Generated by docutils manpage writer.
106
.\" 
107
.