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

Method removeString

valdi_core/src/valdi_core/cpp/Utils/StringCache.cpp:98–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void StringCache::removeString(const InternedStringImpl* internedString) {
99 std::lock_guard<Mutex> guard(_mutex);
100
101 const auto& it = _table.find(internedString, makePHMapHash(internedString->getHash()));
102 if (it != _table.end()) {
103 _table.erase(it);
104 }
105}
106
107std::unique_lock<Mutex> StringCache::lock() {
108 return std::unique_lock<Mutex>(_mutex);

Callers 1

unsafeReleaseInnerMethod · 0.80

Calls 5

makePHMapHashFunction · 0.85
endMethod · 0.65
findMethod · 0.45
getHashMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected