cJSON memory leak
问题 I use cJSON in my program to convert my values to JSON and write it to file. Here is the example of my code: void writeStructToFile(IOPipe this, struct structtype somevalues) { cJSON *jout = cJSON_CreateObject(); cJSON_AddItemToObject(jout, "V1", cJSON_CreateNumber(somevalues.v1)); cJSON_AddItemToObject(jout, "V2", cJSON_CreateNumber(somevalues.v2)); fprintf(this->outstream, "%s", cJSON_Print(jout)); cJSON_Delete(jout); } Works great, but after some time I found that Linux(embedded) kills my