| 102 | } |
| 103 | |
| 104 | extern "C" AclStatus AclDestroyContext(AclContext external_ctx) |
| 105 | { |
| 106 | using namespace arm_compute; |
| 107 | |
| 108 | IContext *ctx = get_internal(external_ctx); |
| 109 | |
| 110 | StatusCode status = detail::validate_internal_context(ctx); |
| 111 | ARM_COMPUTE_RETURN_CENUM_ON_FAILURE(status); |
| 112 | |
| 113 | if (ctx->refcount() != 0) |
| 114 | { |
| 115 | ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL("Context has references on it that haven't been released!"); |
| 116 | // TODO: Fix the refcount with callback when reaches 0 |
| 117 | } |
| 118 | |
| 119 | delete ctx; |
| 120 | |
| 121 | return utils::as_cenum<AclStatus>(status); |
| 122 | } |
no test coverage detected