when you use the cJSON_free() in the structure it doesnt free the obj->string that is previously allocated in the contruction of the tree, we need to deallocated the string manually, i only found this when i need to parse a 500k json lines, and the memory lost in the heap was almost 100x the size of the real object
when you use the cJSON_free() in the structure it doesnt free the obj->string that is previously allocated in the contruction of the tree, we need to deallocated the string manually, i only found this when i need to parse a 500k json lines, and the memory lost in the heap was almost 100x the size of the real object