in test_load.c in version 2.13.1,
if function call json_loads( ), it will json_decref( ) the pointer which return by json_loads.
ex:
json = json_loads("true", JSON_DECODE_ANY, &error);
....
json_decref(json);
But, if function call json_load_file( ), there is no any free memory for return point of json_load_file.
if return pointer of json_load_file is valid, do we need to free memory by json_decref() ??
Hi,
in test_load.c in version 2.13.1, if function call json_loads( ), it will json_decref( ) the pointer which return by json_loads. ex: json = json_loads("true", JSON_DECODE_ANY, &error); .... json_decref(json);
But, if function call json_load_file( ), there is no any free memory for return point of json_load_file. if return pointer of json_load_file is valid, do we need to free memory by json_decref() ??