cJSON_Print 使用一定要记得释放内存

cJSON_Print会申请内存,使用完后要free掉。

 

char* pstr = cJSON_Print(json);

....

free(pstr);

转载于:https://www.cnblogs.com/sbchen/p/9969961.html

你可能感兴趣的:(cJSON_Print 使用一定要记得释放内存)