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

Function RM_CloseKey

src/module.cpp:2372–2377  ·  view source on GitHub ↗

Close a key handle. */

Source from the content-addressed store, hash-verified

2370
2371/* Close a key handle. */
2372void RM_CloseKey(RedisModuleKey *key) {
2373 if (key == NULL) return;
2374 moduleCloseKey(key);
2375 autoMemoryFreed(key->ctx,REDISMODULE_AM_KEY,key);
2376 zfree(key);
2377}
2378
2379/* Return the type of the key. If the key pointer is NULL then
2380 * REDISMODULE_KEYTYPE_EMPTY is returned. */

Callers 1

autoMemoryCollectFunction · 0.85

Calls 3

moduleCloseKeyFunction · 0.85
autoMemoryFreedFunction · 0.85
zfreeFunction · 0.85

Tested by

no test coverage detected