C Collections

cjson · Section 3

cjson_serialize_free_mp, cjson_serialize_free

cjson_serialize_free_mp, cjson_serialize_free - free a string returned by the serializer

C Collections (libccollections, -lccollections)

#include <ccollections/cjson.h>
 
void cjson_serialize_free_mp(char *s, ccol_memmgmt_procs *mp);
/* convenience wrapper; default allocator */
static inline void cjson_serialize_free(char *s);

Frees a string that cjson_serialize() or cjson_serialize_pretty()
returned.  mp must be the allocator that was given to
cjson_parse_mp() or cjson_create_*_mp() when the serialized tree was
built, or NULL when the tree used the default allocator.
cjson_serialize_free() is a static inline wrapper that calls
cjson_serialize_free_mp(s, NULL).

s   The string to free, which may be NULL.
mp  The allocator that frees it, or NULL for the default allocator.

cjson_serialize(3), cjson_serialize_pretty(3)