diff --git a/src/07-03.zig b/src/07-03.zig index cf43f27..e29c343 100644 --- a/src/07-03.zig +++ b/src/07-03.zig @@ -2,9 +2,9 @@ const std = @import("std"); const print = std.debug.print; pub fn main() !void { - var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); - defer arena.deinit(); - const allocator = arena.allocator(); + var gpa = std.heap.GeneralPurposeAllocator(.{}){}; + defer if (gpa.deinit() != .ok) @panic("leak"); + const allocator = gpa.allocator(); var pool: std.Thread.Pool = undefined; try pool.init(.{