Better example

This commit is contained in:
adrien 2026-05-18 14:11:17 +02:00
parent f5daf66784
commit 7ce6b9cd1d

View File

@ -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);