MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / Clear

Function Clear

rapidjson/document.h:1516–1522  ·  view source on GitHub ↗

Remove all elements in the array. ! This function do not deallocate memory in the array, i.e. the capacity is unchanged. \note Linear time complexity. */

Source from the content-addressed store, hash-verified

1514 \note Linear time complexity.
1515 */
1516 void Clear() {
1517 RAPIDJSON_ASSERT(IsArray());
1518 GenericValue* e = GetElementsPointer();
1519 for (GenericValue* v = e; v != e + data_.a.size; ++v)
1520 v->~GenericValue();
1521 data_.a.size = 0;
1522 }
1523
1524 //! Get an element from array by index.
1525 /*! \pre IsArray() == true

Callers 1

~MemoryPoolAllocatorMethod · 0.70

Calls 2

IsArrayFunction · 0.85
GetElementsPointerFunction · 0.85

Tested by

no test coverage detected