Closed MattCatz closed 2 months ago
cJSON structures need to be deleted rather than free-ed so all sub-structures are cleaned up.
cJSON
I don't think this was causing any major leaks but should now be causing no leaks :D.
See: https://github.com/OnionUI/Onion/blob/7dfc008b851398dcfe57819519efe5f958c77f65/include/cjson/cJSON.h#L146
You learn something every day.. did you compile and test this?
I have compiled and run this. I cherry-picked this form between some other patches so let me know if it doesn't apply correctly.
cJSON
structures need to be deleted rather than free-ed so all sub-structures are cleaned up.I don't think this was causing any major leaks but should now be causing no leaks :D.
See: https://github.com/OnionUI/Onion/blob/7dfc008b851398dcfe57819519efe5f958c77f65/include/cjson/cJSON.h#L146