| 298 | } |
| 299 | |
| 300 | void 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 | } |