1
.TH "MEMCACHED_FREE" "3" "March 14, 2012" "1.0.5" "libmemcached"
3
memcached_free \- libmemcached Documentation
5
.nr rst2man-indent-level 0
9
level \\n[rst2man-indent-level]
10
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17
.\" .rstReportMargin pre:
19
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
. nr rst2man-indent-level +1
21
.\" .rstReportMargin post:
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
31
.\" Man page generated from reStructeredText.
35
#include <libmemcached/memcached.h>
42
.B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
46
.B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
50
.B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
54
.B void memcached_servers_reset(\fI\%memcached_st\fP)
57
Compile and link with \-lmemcached
60
\fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
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
63
\fI\%memcached_st\fP to \fI\%memcached_create()\fP or
64
a NULL. If a NULL passed in then a structure is allocated for you.
66
Please note, when you write new application use
67
\fBmemcached()\fP over
68
\fI\%memcached_create()\fP.
70
\fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
71
it copies the defaults and list of servers from the source
72
\fI\%memcached_st\fP. If you pass a null as the argument for the source
73
to clone, it is the same as a call to \fI\%memcached_create()\fP.
74
If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
77
\fI\%memcached_servers_reset()\fP allows you to zero out the list of
78
servers that the \fI\%memcached_st\fP has.
80
To clean up memory associated with a \fI\%memcached_st\fP structure you
81
should pass it to \fI\%memcached_free()\fP when you are finished using it.
82
\fI\%memcached_free()\fP is the only way to make sure all memory is
83
deallocated when you finish using the structure.
85
You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
86
stack based allocation. The most common issues related to ABI safety involve
87
heap allocated structures.
90
\fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
91
that was created (or initialized). On an allocation failure, it returns NULL.
93
\fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
94
that was created (or initialized). On an allocation failure, it returns NULL.
97
To find out more information please check:
98
\fI\%http://libmemcached.org/\fP
101
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
105
2011, Brian Aker DataDifferential, http://datadifferential.com/
106
.\" Generated by docutils manpage writer.