Jansson 2.4, json_dumps, VC10, I can not clear the allocated memory

33 views
Skip to first unread message

Александр Гладун

unread,
Mar 29, 2019, 2:57:30 AM3/29/19
to Jansson users
Hi

I have a problem when I need to free the allocated memory.


#include <iostream>
#include <jansson.h>

json_t *json_obj;
json_obj = json_pack("{ssssss}",
                       "test", "test",
                       "test1", "test",
                       "test2", "test");

char *s;
s = json_dumps(json_obj, JSON_INDENT(31));
std::cout << s << std::endl;
free(s);


_CrtIsValidHeapPointer(pUserData)



Александр Гладун

unread,
Mar 29, 2019, 3:34:15 AM3/29/19
to Jansson users
Reply all
Reply to author
Forward
0 new messages