aboutsummaryrefslogtreecommitdiff
path: root/ggml-metal.m
diff options
context:
space:
mode:
Diffstat (limited to 'ggml-metal.m')
-rw-r--r--ggml-metal.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/ggml-metal.m b/ggml-metal.m
index 7551231..fd69c41 100644
--- a/ggml-metal.m
+++ b/ggml-metal.m
@@ -202,7 +202,9 @@ struct ggml_metal_context * ggml_metal_init(void) {
void ggml_metal_free(struct ggml_metal_context * ctx) {
fprintf(stderr, "%s: deallocating\n", __func__);
-
+ for (int i = 0; i < ctx->n_buffers; ++i) {
+ [ctx->buffers[i].metal release];
+ }
free(ctx);
}