MCPcopy Create free account
hub / github.com/apache/trafficserver / clear

Method clear

src/iocore/hostdb/P_RefCountCache.h:290–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289template <class C>
290void
291RefCountCachePartition<C>::clear()
292{
293 // Since the hash nodes embed the list pointers, you can't iterate over the
294 // hash elements and deallocate them, let alone remove them from the hash.
295 // Hence, this monstrosity.
296 auto it = this->item_map.begin();
297 while (it != this->item_map.end()) {
298 auto cur = it++;
299
300 this->item_map.erase(cur);
301 this->dealloc_entry(cur);
302 }
303}
304
305// Are we full?
306template <class C>

Callers 5

freeMethod · 0.45
testclearFunction · 0.45
testFunction · 0.45
mainFunction · 0.45
clear_and_startMethod · 0.45

Calls 4

dealloc_entryMethod · 0.95
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 3

testclearFunction · 0.36
testFunction · 0.36
mainFunction · 0.36