MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / reset

Method reset

framework/utils/CicadaJSON.cpp:317–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317void CicadaJSONArray::reset()
318{
319 std::lock_guard<std::mutex> lock(mMutex);
320
321 if (mArray) {
322 cJSON_Delete(mArray);
323 }
324
325 for (auto item : items) {
326 delete item;
327 }
328
329 items.clear();
330 mArray = cJSON_CreateArray();
331}
332
333int CicadaJSONArray::getSize()
334{

Callers

nothing calls this directly

Calls 3

cJSON_DeleteFunction · 0.85
cJSON_CreateArrayFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected