MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / dictRelease

Function dictRelease

src/dict.cpp:839–846  ·  view source on GitHub ↗

Clear & Release the hash table */

Source from the content-addressed store, hash-verified

837
838/* Clear & Release the hash table */
839void dictRelease(dict *d)
840{
841 if (__atomic_sub_fetch(&d->refcount, 1, __ATOMIC_ACQ_REL) == 0) {
842 _dictClear(d,&d->ht[0],NULL);
843 _dictClear(d,&d->ht[1],NULL);
844 zfree(d);
845 }
846}
847
848dictEntry *dictFindWithPrev(dict *d, const void *key, uint64_t h, dictEntry ***dePrevPtr, dictht **pht, bool fShallowCompare)
849{

Callers 15

~redisDbMethod · 0.70
clearMethod · 0.70
processChangesMethod · 0.70
processChangesAsyncMethod · 0.70
commitChangesMethod · 0.70
removeAllCachedValuesMethod · 0.70
~StorageCacheMethod · 0.70
emergencyFreeCacheMethod · 0.70
~dictAsyncRehashCtlMethod · 0.70
dictTestFunction · 0.70
~FreeMemoryLazyFreeMethod · 0.70

Calls 2

zfreeFunction · 0.85
_dictClearFunction · 0.70

Tested by

no test coverage detected