MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_Delete

Function cJSON_Delete

eval/LANE_evaluation/lane2d/src/cJSON.c:99–114  ·  view source on GitHub ↗

Delete a cJSON structure. */

Source from the content-addressed store, hash-verified

97
98/* Delete a cJSON structure. */
99void cJSON_Delete(cJSON *c)
100{
101 cJSON *next;
102 while (c)
103 {
104 next = c->next;
105 if (!(c->type & cJSON_IsReference) && c->child)
106 cJSON_Delete(c->child);
107 if (!(c->type & cJSON_IsReference) && c->valuestring)
108 cJSON_free(c->valuestring);
109 if (c->string)
110 cJSON_free(c->string);
111 cJSON_free(c);
112 c = next;
113 }
114}
115
116/* Parse the input text to generate a number, and populate the result into item. */
117static const char *parse_number(cJSON *item, const char *num)

Callers 5

ClearMethod · 0.85
cJSON_ParseFunction · 0.85
cJSON_ReplaceItemInArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected