Closed hiallo closed 3 years ago
Don’t call json_delete, it’s done automatically when refcount drops to 0. The memory contents are still intact, but accessing the freed memory is an error nevertheless.
Also, it’s your responsibility to free() the string returned by json_dump. It’s not managed with root.
ok ,thanks
result:
After use
json_decref
andjson_delete
,Iprintf(json)
have no error,why?