.\" Man page generated from reStructuredText .\" by the Docutils 0.22.3 manpage writer. . . .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 .. .TH "MEMCACHED_SERVERS_RESET" "3" "Mar 07, 2026" "1.1" "libmemcached-awesome" .SH NAME memcached_servers_reset \- libmemcached Documentation .SH SYNOPSIS .INDENT 0.0 .TP .B #include Compile and link with \-lmemcached .UNINDENT .INDENT 0.0 .TP .B typedef struct memcached_st memcached_st .UNINDENT .INDENT 0.0 .TP .B memcached_st *memcached_create(memcached_st *ptr) .INDENT 7.0 .TP .B Parameters \fBptr\fP \-\- pointer to user\-allocated \fBmemcached_st\fP struct or null pointer .TP .B Returns pointer to initialized \fBmemcached_st\fP struct .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void memcached_free(memcached_st *ptr) .INDENT 7.0 .TP .B Parameters \fBptr\fP \-\- pointer to initialized \fBmemcached_st\fP struct to destroy and possibly free .UNINDENT .UNINDENT .INDENT 0.0 .TP .B memcached_st *memcached_clone(memcached_st *destination, memcached_st *source) .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBdestination\fP \-\- pointer to user\-allocated \fBmemcached_st\fP struct or null pointer .IP \(bu 2 \fBsource\fP \-\- pointer to initialized \fBmemcached_st\fP struct to copy from .UNINDENT .TP .B Returns pointer to newly initialized \fBdestination\fP, copied from \fBsource\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void memcached_servers_reset(memcached_st *ptr) .INDENT 7.0 .TP .B Parameters \fBptr\fP \-\- pointer to initialized \fBmemcached_st\fP struct .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBmemcached_create()\fP is used to create a \fBmemcached_st\fP structure that will then be used by other \fBlibmemcached\fP functions to communicate with the server. You should either pass a statically declared \fBmemcached_st\fP to \fBmemcached_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 \%<#\:_CPPv49memcachedPKc6size_t> over \fBmemcached_create()\fP\&. .sp \fBmemcached_clone()\fP is similar to \fBmemcached_create()\fP but it copies the defaults and list of servers from the source \fBmemcached_st\fP pointer. If you pass a null as the argument for the source to clone, it is the same as a call to \fBmemcached_create()\fP\&. If the destination argument is NULL a \fBmemcached_st\fP will be allocated for you. .sp \fBmemcached_servers_reset()\fP allows you to zero out the list of servers that the \fBmemcached_st\fP has. .sp To clean up memory associated with a \fBmemcached_st\fP structure you should pass it to \fBmemcached_free()\fP when you are finished using it. \fBmemcached_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 \fBmemcached_create()\fP or \fBmemcached_clone()\fP with a stack based allocation. The most common issues related to ABI safety involve heap allocated structures. .SH RETURN VALUE .sp \fBmemcached_create()\fP returns a pointer to the \fBmemcached_st\fP that was created (or initialized). On an allocation failure, it returns NULL. .sp \fBmemcached_clone()\fP returns a pointer to the \fBmemcached_st\fP that was created (or initialized). On an allocation failure, it returns NULL. .SH SEE ALSO .sp \fBmemcached(1) \%\fP \fBlibmemcached(3) \%\fP .\" End of generated man page.