Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

C++ JSON Memory Management?

$
0
0

When constructing JSON parameter for Dropbox endpoint /upload_session/append_v2:

    CkJsonObject jsonParams;
    jsonParams.AddObjectAt(-1, “cursor");
    CkJsonObject *jsonCursor = jsonParams.ObjectOf(“cursor");
    jsonCursor->AddStringAt(-1, "session_id", sessionIdStr);
jsonParams correctly ends up with a nested “cursor” object containing “session_id”. So it appears that jsonParams and jsonCursor shares some memory. So we aren’t sure if we should we explicitly delete jsonCursor, or just let jsonParams goes out of scope and destructs.


Viewing all articles
Browse latest Browse all 1061

Trending Articles