C Collections

chttpclient · Section 3

chttpcli_async_result_free

chttpcli_async_result_free - free a chttpcli_async_result

C Collections (libccollections, -lccollections)

#include <ccollections/chttpclient.h>
 
void chttpcli_async_result_free(chttpcli_async_result *result);

This function frees a chttpcli_async_result that
chttpcli_async_result_get returned. It does NOT free result->resp,
so when result->rv == ccol_success you have to free that first, with
its own call to chttpcli_resp_free. It does NOT free the future
either: Pair it with exactly one separate cthrpool_future_free call,
before or after this one (the order does not matter). The result keeps
its own copy of the client's allocator, so this call is valid before
or after chttpcli_destroy of that client.

result The result to free. NULL is a safe no-op.

None.

chttpcli_async_result_get(3), chttpcli_resp_free(3), cthrpool_future_free(3)