void memcached_result_free(memcached_result_st *ptr) { if (ptr == NULL) return; memcached_string_free(&ptr->value); if (ptr->is_allocated) free(ptr); }
void memcached_result_free(memcached_result_st *ptr) { if (ptr == NULL) return; memcached_string_free(&ptr->value); if (ptr->is_allocated == MEMCACHED_ALLOCATED) free(ptr); else ptr->is_allocated= MEMCACHED_USED; }
void memcached_result_free(memcached_result_st *ptr) { if (ptr == NULL) return; memcached_string_free(&ptr->value); if (memcached_is_allocated(ptr)) { WATCHPOINT_ASSERT(ptr->root); // Without a root, that means that result was not properly initialized. libmemcached_free(ptr->root, ptr); } else { ptr->options.is_initialized= false; } }