Skip to content

Commit

Permalink
Call destructor of layers vector
Browse files Browse the repository at this point in the history
  • Loading branch information
saharNooby committed Apr 19, 2023
1 parent fa9d018 commit a030d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rwkv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,10 @@ bool rwkv_eval(struct rwkv_context * ctx, int32_t token, float * state_in, float
}

void rwkv_free(struct rwkv_context * ctx) {
ggml_free(ctx->ctx);

ctx->model->layers.~vector();
free(ctx->model);
delete[] ctx->state_parts;
ggml_free(ctx->ctx);
free(ctx->graph);
free(ctx);
}
Expand Down

0 comments on commit a030d5b

Please sign in to comment.