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

Function RM_FreeDict

app/redis-6.2.6/src/module.c:6672–6676  ·  view source on GitHub ↗

Free a dictionary created with RM_CreateDict(). You need to pass the * context pointer 'ctx' only if the dictionary was created using the * context instead of passing NULL. */

Source from the content-addressed store, hash-verified

6670 * context pointer 'ctx' only if the dictionary was created using the
6671 * context instead of passing NULL. */
6672void RM_FreeDict(RedisModuleCtx *ctx, RedisModuleDict *d) {
6673 if (ctx != NULL) autoMemoryFreed(ctx,REDISMODULE_AM_DICT,d);
6674 raxFree(d->rax);
6675 zfree(d);
6676}
6677
6678/* Return the size of the dictionary (number of keys). */
6679uint64_t RM_DictSize(RedisModuleDict *d) {

Callers 1

autoMemoryCollectFunction · 0.85

Calls 3

autoMemoryFreedFunction · 0.85
raxFreeFunction · 0.85
zfreeFunction · 0.70

Tested by

no test coverage detected