If those do not get added to any other object, you need to call json_object_put() on each one.
On the other hand, if you *did* add them to a containing object, then the "ownership" of those objects has transferred over and you need to call json_object_put() on whatever your top-level object is. That will free all children.
If you need the objects to stick around even after the top-level object is freed, you can manually increase the reference count with json_object_get(), but that is probably not something you want to do.
Eric
On Jun 30, 2012 5:03 PM, "Pawel" <pawel....@gmail.com> wrote:
>
> Sorry, folks, can't figure out how do I then delete the root object? :)
Like I said, call json_object_put() on the your top-level (aka root) object.
If you're having problems, please provide a small sample program that demonstrates the issue and we'll see what we can figure out.
Eric
On Jun 30, 2012 5:03 PM, "Pawel" wrote:
>
> Sorry, folks, can't figure out how do I then delete the root object? :)Like I said, call json_object_put() on the your top-level (aka root) object.
If you're having problems, please provide a small sample program that demonstrates the issue and we'll see what we can figure out.