The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
.TH "MEMCACHED_CLONE" "3" "April 03, 2013" "1.0.17" "libmemcached"
.SH NAME
memcached_clone \- libmemcached Documentation
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" Man page generated from reStructuredText.
.
.SH SYNOPSIS
.sp
#include <libmemcached/memcached.h>
.INDENT 0.0
.TP
.B memcached_st
.UNINDENT
.INDENT 0.0
.TP
.B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
.UNINDENT
.INDENT 0.0
.TP
.B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void memcached_servers_reset(\fI\%memcached_st\fP)
.UNINDENT
.sp
Compile and link with \-lmemcached
.SH DESCRIPTION
.sp
\fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
structure that will then be used by other libmemcached(3) functions to
communicate with the server. You should either pass a statically declared
\fI\%memcached_st\fP to \fI\%memcached_create()\fP or
a NULL. If a NULL passed in then a structure is allocated for you.
.sp
Please note, when you write new application use
\fBmemcached()\fP over \fI\%memcached_create()\fP.
.sp
\fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
it copies the defaults and list of servers from the source
\fI\%memcached_st\fP. If you pass a null as the argument for the source
to clone, it is the same as a call to \fI\%memcached_create()\fP.
If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
for you.
.sp
\fI\%memcached_servers_reset()\fP allows you to zero out the list of
servers that the \fI\%memcached_st\fP has.
.sp
To clean up memory associated with a \fI\%memcached_st\fP structure you
should pass it to \fI\%memcached_free()\fP when you are finished using it.
\fI\%memcached_free()\fP is the only way to make sure all memory is
deallocated when you finish using the structure.
.sp
You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
stack based allocation. The most common issues related to ABI safety involve
heap allocated structures.
.SH RETURN
.sp
\fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
that was created (or initialized). On an allocation failure, it returns NULL.
.sp
\fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
that was created (or initialized). On an allocation failure, it returns NULL.
.SH HOME
.sp
To find out more information please check:
\fI\%http://libmemcached.org/\fP
.SH SEE ALSO
.sp
\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
.SH AUTHOR
Brian Aker
.SH COPYRIGHT
2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
.\" Generated by docutils manpage writer.
.