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

Function AllPathsCtx_Free

src/algorithms/all_paths.c:300–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void AllPathsCtx_Free(AllPathsCtx *ctx) {
301 if(!ctx) return;
302 uint32_t levelsCount = array_len(ctx->levels);
303 for(int i = 0; i < levelsCount; i++) array_free(ctx->levels[i]);
304 array_free(ctx->levels);
305 Path_Free(ctx->path);
306 array_free(ctx->neighbors);
307 if(ctx->visited) GrB_Vector_free(&ctx->visited);
308 rm_free(ctx);
309 ctx = NULL;
310}

Callers 8

CondVarLenTraverseResetFunction · 0.85
CondVarLenTraverseFreeFunction · 0.85
test_noPathsFunction · 0.85
test_longest_PathsFunction · 0.85
test_upToThreeLegsPathsFunction · 0.85
test_twoLegPathsFunction · 0.85

Calls 5

array_lenFunction · 0.85
array_freeFunction · 0.85
Path_FreeFunction · 0.85
GrB_Vector_freeFunction · 0.85
rm_freeFunction · 0.85

Tested by 5

test_noPathsFunction · 0.68
test_longest_PathsFunction · 0.68
test_upToThreeLegsPathsFunction · 0.68
test_twoLegPathsFunction · 0.68