MCPcopy Create free account
hub / github.com/couchbase/fleece / deleteTree

Method deleteTree

Fleece/Tree/MutableNode.hh:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116 void deleteTree() {
117 unsigned n = childCount();
118 for (unsigned i = 0; i < n; ++i) {
119 auto child = _children[i].asMutable();
120 if (child) {
121 if (child->isLeaf())
122 delete (MutableLeaf*)child;
123 else
124 ((MutableInterior*)child)->deleteTree();
125 }
126 }
127 delete this;
128 }
129
130
131 unsigned leafCount() const {

Callers 2

~MutableHashTreeMethod · 0.80
MutableHashTree.ccFile · 0.80

Calls 2

asMutableMethod · 0.45
isLeafMethod · 0.45

Tested by

no test coverage detected