From fc41e261ecc482da413007642743bb25b9e5f3b4 Mon Sep 17 00:00:00 2001 From: -k Date: Wed, 29 May 2024 11:13:48 -0700 Subject: [PATCH] fix: fix `core` memory leak --- src/main.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.zig b/src/main.zig index e2d8085..e9b3f4c 100644 --- a/src/main.zig +++ b/src/main.zig @@ -178,6 +178,11 @@ pub fn main() !void { core.width_sec = try getNthValues(allocator, core.width, 5); core.height_sec = try getNthValues(allocator, core.height, 3); + defer { + allocator.free(core.width_sec); + allocator.free(core.height_sec); + } + { const t0 = try std.Thread.spawn(.{}, animation, .{&core}); defer t0.join();