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

Function RM_FreeString

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

Free a module string object obtained with one of the Redis modules API calls * that return new string objects. * * It is possible to call this function even when automatic memory management * is enabled. In that case the string will be released ASAP and removed * from the pool of string to release at the end. * * If the string was created with a NULL context 'ctx', it is also possible to *

Source from the content-addressed store, hash-verified

1235 * the context, so if you want to free a string out of context later, make sure
1236 * to create it using a NULL context. */
1237void RM_FreeString(RedisModuleCtx *ctx, RedisModuleString *str) {
1238 decrRefCount(str);
1239 if (ctx != NULL) autoMemoryFreed(ctx,REDISMODULE_AM_STRING,str);
1240}
1241
1242/* Every call to this function, will make the string 'str' requiring
1243 * an additional call to RedisModule_FreeString() in order to really

Callers

nothing calls this directly

Calls 2

decrRefCountFunction · 0.85
autoMemoryFreedFunction · 0.85

Tested by

no test coverage detected