MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dictUnlink

Function dictUnlink

app/redis-6.2.6/src/dict.c:455–457  ·  view source on GitHub ↗

Remove an element from the table, but without actually releasing * the key, value and dictionary entry. The dictionary entry is returned * if the element was found (and unlinked from the table), and the user * should later call `dictFreeUnlinkedEntry()` with it in order to release it. * Otherwise if the key is not found, NULL is returned. * * This function is useful when we want to remove so

Source from the content-addressed store, hash-verified

453 * dictFreeUnlinkedEntry(entry); // <- This does not need to lookup again.
454 */
455dictEntry *dictUnlink(dict *ht, const void *key) {
456 return dictGenericDelete(ht,key,1);
457}
458
459/* You need to call this function to really free the entry after a call
460 * to dictUnlink(). It's safe to call this function with 'he' = NULL. */

Callers 6

dbAsyncDeleteFunction · 0.85
dbSyncDeleteFunction · 0.85
zsetRemoveFromSkiplistFunction · 0.85

Calls 1

dictGenericDeleteFunction · 0.85

Tested by

no test coverage detected