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

Function dereference

src/ArduinoJson/Memory/StringPool.hpp:81–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void dereference(const char* s, Allocator* allocator) {
82 StringNode* prev = nullptr;
83 for (auto node = strings_; node; node = node->next) {
84 if (node->data == s) {
85 if (--node->references == 0) {
86 if (prev)
87 prev->next = node->next;
88 else
89 strings_ = node->next;
90 StringNode::destroy(node, allocator);
91 }
92 return;
93 }
94 prev = node;
95 }
96 }
97
98 private:
99 StringNode* strings_ = nullptr;

Callers

nothing calls this directly

Calls 1

destroyFunction · 0.85

Tested by

no test coverage detected