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