X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached.hpp;h=d7086b4ce301ea11a876fdcb3a20f8b0831a009a;hb=67e1b61bd9840daef731de3159d06875eed93c9e;hp=c1ca1bd2737040a16328b3908ef329483389765c;hpb=ede87e9f8c75bb6a5b0223f79d445028d1d99f85;p=awesomized%2Flibmemcached diff --git a/libmemcached/memcached.hpp b/libmemcached/memcached.hpp index c1ca1bd2..d7086b4c 100644 --- a/libmemcached/memcached.hpp +++ b/libmemcached/memcached.hpp @@ -238,6 +238,11 @@ public: key.assign(ret_key); free(value); } + else if (value) + { + free(value); + } + return rc; } @@ -920,6 +925,14 @@ public: return version; } + /** + * Retrieve memcached statistics. Populate a std::map with the retrieved + * stats. Each server will map to another std::map of the key:value stats. + * + * @param[out] stats_map a std::map to be populated with the memcached + * stats + * @return true on success; false otherwise + */ bool getStats(std::map< std::string, std::map > &stats_map) {