MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / Decref

Method Decref

extern/re2/re2/regexp.cc:116–132  ·  view source on GitHub ↗

Decrements reference count and deletes this object if count reaches 0.

Source from the content-addressed store, hash-verified

114
115// Decrements reference count and deletes this object if count reaches 0.
116void Regexp::Decref() {
117 if (ref_ == kMaxRef) {
118 // Ref count is stored in overflow map.
119 MutexLock l(ref_mutex);
120 int r = (*ref_map)[this] - 1;
121 if (r < kMaxRef) {
122 ref_ = static_cast<uint16_t>(r);
123 ref_map->erase(this);
124 } else {
125 (*ref_map)[this] = r;
126 }
127 return;
128 }
129 ref_--;
130 if (ref_ == 0)
131 Destroy();
132}
133
134// Deletes this object; ref count has count reached 0.
135void Regexp::Destroy() {

Callers 2

DestroyMethod · 0.45
StarPlusOrQuestMethod · 0.45

Calls 1

eraseMethod · 0.45

Tested by

no test coverage detected