Hi -
I’m using the note-c library. Let’s say I want to create a Note, to be sent to Notehub. I’ll use something like this:
J *req = NoteNewRequest(“note.add”);
JAddStringToObject(req, “file”, “readings.qo”);
…
J *rsp = NoteRequestResponseWithRetry(req, 5);
But I have to add a body to the Note. I’m assuming I do that something like this:
J *body = JAddObjectToObject(req, “body”);
JAddNumberToObject(body, “p1”, 12);
But now I’m puzzled. Once I have called:
J *rsp = NoteRequestResponseWithRetry(req, 5);
I understand that “the passed in request object is always freed”, per the note-c documentation, but does the nested object “body” automatically get freed too, or is my code responsible for calling JDelete(body)?