MCPcopy Create free account
hub / github.com/Snapchat/Valdi / releaseRef

Method releaseRef

valdi_core/src/valdi_core/cpp/Utils/ReferenceTable.cpp:207–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207bool ReferenceTable::WriteAccess::releaseRef(SequenceID id) const {
208 auto& entry = _table->getEntry(id);
209 entry.retainCount--;
210
211 if (entry.retainCount > 0) {
212 return true;
213 }
214
215 entry.id = Valdi::SequenceID();
216 entry.tag = nullptr;
217 _table->_sequence.releaseId(id);
218 return false;
219}
220
221bool ReferenceTable::WriteAccess::contains(SequenceID id) const {
222 return _table->contains(id);

Callers

nothing calls this directly

Calls 3

SequenceIDClass · 0.85
releaseIdMethod · 0.80
getEntryMethod · 0.45

Tested by

no test coverage detected