| 315 | } |
| 316 | |
| 317 | void 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 | |
| 333 | int CicadaJSONArray::getSize() |
| 334 | { |
nothing calls this directly
no test coverage detected