4 memcached_create, memcached_free, memcached_clone, memcached_servers_reset
5 **************************************************************************
8 Create a memcached_st structure
16 C Client Library for memcached (libmemcached, -lmemcached)
27 #include <memcached.h>
29 memcached_st *memcached_create (memcached_st *ptr);
31 void memcached_free (memcached_st *ptr);
33 memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
35 void memcached_servers_reset(memcached_st);
44 memcached_create() is used to create a \ ``memcached_st``\ structure that will then
45 be used by other libmemcached(3) functions to communicate with the server. You
46 should either pass a statically declared \ ``memcached_st``\ to memcached_create() or
47 a NULL. If a NULL passed in then a structure is allocated for you.
49 memcached_clone() is similar to memcached_create(3) but it copies the
50 defaults and list of servers from the source \ ``memcached_st``\ . If you pass a null as
51 the argument for the source to clone, it is the same as a call to memcached_create().
52 If the destination argument is NULL a \ ``memcached_st``\ will be allocated for you.
54 memcached_servers_reset() allows you to zero out the list of servers that
57 To clean up memory associated with a \ ``memcached_st``\ structure you should pass
58 it to memcached_free() when you are finished using it. memcached_free() is
59 the only way to make sure all memory is deallocated when you finish using
62 You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
63 stack based allocation. The most common issues related to ABI safety involve
64 heap allocated structures.
72 memcached_create() returns a pointer to the memcached_st that was created
73 (or initialized). On an allocation failure, it returns NULL.
75 memcached_clone() returns a pointer to the memcached_st that was created
76 (or initialized). On an allocation failure, it returns NULL.
84 To find out more information please check:
85 `https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
93 Brian Aker, <brian@tangent.org>
101 memcached(1) libmemcached(3) memcached_strerror(3)