Function deinit [src]

Prototype

pub fn deinit(self: ArenaAllocator) void

Parameters

self: ArenaAllocator

Source

pub fn deinit(self: ArenaAllocator) void { // NOTE: When changing this, make sure `reset()` is adjusted accordingly! var it = self.state.buffer_list.first; while (it) |node| { // this has to occur before the free because the free frees node const next_it = node.next; const alloc_buf = @as([*]u8, @ptrCast(node))[0..node.data]; self.child_allocator.rawFree(alloc_buf, BufNode_alignment, @returnAddress()); it = next_it; } }