From 42e593e49f212443abc547d5c9304e8597d8066f Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Fri, 25 Sep 2026 10:53:13 +0800 Subject: [PATCH] remove unused deinit --- src/RecyclingAllocator.zig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/RecyclingAllocator.zig b/src/RecyclingAllocator.zig index 4e2c44ef6..663d8c10b 100644 --- a/src/RecyclingAllocator.zig +++ b/src/RecyclingAllocator.zig @@ -26,6 +26,7 @@ // has been freed. Nothing is ever returned to the child. const std = @import("std"); +const lp = @import("lightpanda"); const Allocator = std.mem.Allocator; const Alignment = std.mem.Alignment; @@ -70,10 +71,6 @@ pub fn init(child_allocator: Allocator) RecyclingAllocator { return .{ .child_allocator = child_allocator }; } -pub fn deinit(self: *RecyclingAllocator) void { - self.free_lists.deinit(self.child_allocator); -} - pub fn allocator(self: *RecyclingAllocator) Allocator { return .{ .ptr = self, @@ -114,7 +111,7 @@ fn free(ctx: *anyopaque, memory: []u8, alignment: Alignment, _: usize) void { } const slot = memory.ptr; - if (comptime std.debug.runtime_safety) { + if (comptime lp.IS_DEBUG) { // Make a use-after-free read garbage rather than the old object. @memset(slot[0..class.size], undefined); } @@ -134,7 +131,6 @@ const TestAllocator = struct { } fn deinit(self: *TestAllocator) void { - self.recycling.deinit(); self.arena.deinit(); } };