From 7ce6b9cd1d4fab8b7af7bcd5d2b22d20c9dad424 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 18 May 2026 14:11:17 +0200 Subject: [PATCH] Better example --- src/example.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/example.zig b/src/example.zig index 75e60ef..c81da3c 100644 --- a/src/example.zig +++ b/src/example.zig @@ -37,7 +37,9 @@ pub fn main(init: std.process.Init) !void { defer b.deinit(); const sum = try a.run(gloc, b, add_pip); - defer sum.deinit(); + // Don't need `sum.deinit()` because grena will deallocate everything when deinit + + std.debug.print("Bytes used: {d} (3 * {d})\n", .{ grena.allocated_vram_bytes, a.byteSize() }); const out = try sum.read(gloc, allocator); defer allocator.free(out);