MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Cache_Free

Function Cache_Free

src/util/cache/cache.c:148–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void Cache_Free(Cache *cache) {
149 ASSERT(cache != NULL);
150
151 // free cache entries
152 for(size_t i = 0; i < cache->size; i++) {
153 CacheEntry *entry = cache->arr + i;
154 rm_free(entry->key);
155 cache->free_item(entry->value);
156 }
157
158 rm_free(cache->arr);
159 raxFree(cache->lookup);
160
161 int res = pthread_rwlock_destroy(&cache->_cache_rwlock);
162 UNUSED(res);
163 ASSERT(res == 0);
164
165 rm_free(cache);
166}
167

Callers 2

_GraphContext_FreeFunction · 0.85
test_executionPlanCacheFunction · 0.85

Calls 1

rm_freeFunction · 0.85

Tested by 1

test_executionPlanCacheFunction · 0.68