MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_Delete

Function cJSON_Delete

common/map_sdk/transmission/src/cJSON.cpp:79–89  ·  view source on GitHub ↗

Delete a cJSON structure. */

Source from the content-addressed store, hash-verified

77
78/* Delete a cJSON structure. */
79void cJSON_Delete(cJSON *c) {
80 cJSON *next;
81 while (c) {
82 next = c->next;
83 if (!(c->type & cJSON_IsReference) && c->child) cJSON_Delete(c->child);
84 if (!(c->type & cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
85 if (c->string) cJSON_free(c->string);
86 cJSON_free(c);
87 c = next;
88 }
89}
90
91/* Parse the input text to generate a number, and populate the result into item. */
92static const char *parse_number(cJSON *item, const char *num) {

Callers 5

cJSON_ParseFunction · 0.85
cJSON_ReplaceItemInArrayFunction · 0.85
ClearMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected