free SinglePairCtx
| 66 | |
| 67 | // free SinglePairCtx |
| 68 | static void SinglePairCtx_Free |
| 69 | ( |
| 70 | SinglePairCtx *ctx |
| 71 | ) { |
| 72 | if(ctx == NULL) return; |
| 73 | |
| 74 | uint32_t levelsCount = array_len(ctx->levels); |
| 75 | for(int i = 0; i < levelsCount; i++) array_free(ctx->levels[i]); |
| 76 | if(ctx->levels) array_free(ctx->levels); |
| 77 | if(ctx->path) Path_Free(ctx->path); |
| 78 | if(ctx->neighbors) array_free(ctx->neighbors); |
| 79 | if(ctx->relationIDs) { |
| 80 | array_free(ctx->relationIDs); |
| 81 | } |
| 82 | if(ctx->path_count == 0 && ctx->array != NULL) array_free(ctx->array); |
| 83 | else if(ctx->path_count > 1 && ctx->heap != NULL) Heap_free(ctx->heap); |
| 84 | array_free(ctx->output); |
| 85 | rm_free(ctx); |
| 86 | } |
| 87 | |
| 88 | // initialize returned values pointers |
| 89 | static void _process_yield |
no test coverage detected