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

Method Clear

rapidjson/allocators.h:167–175  ·  view source on GitHub ↗

Deallocates all memory chunks, excluding the user-supplied buffer.

Source from the content-addressed store, hash-verified

165
166 //! Deallocates all memory chunks, excluding the user-supplied buffer.
167 void Clear() {
168 while (chunkHead_ && chunkHead_ != userBuffer_) {
169 ChunkHeader* next = chunkHead_->next;
170 baseAllocator_->Free(chunkHead_);
171 chunkHead_ = next;
172 }
173 if (chunkHead_ && chunkHead_ == userBuffer_)
174 chunkHead_->size = 0; // Clear user buffer
175 }
176
177 //! Computes the total capacity of allocated memory chunks.
178 /*! \return total capacity in bytes.

Callers

nothing calls this directly

Calls 1

FreeMethod · 0.45

Tested by

no test coverage detected