MCPcopy Create free account
hub / github.com/bblanchon/ArduinoJson / clear

Method clear

src/ArduinoJson/Memory/MemoryPoolList.hpp:117–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 }
116
117 void clear(Allocator* allocator) {
118 for (PoolCount i = 0; i < count_; i++)
119 pools_[i].destroy(allocator);
120 count_ = 0;
121 freeList_ = NULL_SLOT;
122 if (pools_ != preallocatedPools_) {
123 allocator->deallocate(pools_);
124 pools_ = preallocatedPools_;
125 capacity_ = ARDUINOJSON_INITIAL_POOL_COUNT;
126 }
127 }
128
129 SlotCount usage() const {
130 SlotCount total = 0;

Callers

nothing calls this directly

Calls 2

destroyMethod · 0.80
deallocateMethod · 0.45

Tested by

no test coverage detected