fixing debug allocator
Build / build (push) Successful in 4m14s
Test / build_and_test (push) Has been cancelled

This commit is contained in:
2026-05-08 14:23:49 +02:00
parent eb743c914e
commit e793cb6c3f
9 changed files with 72 additions and 28 deletions
+5 -2
View File
@@ -93,9 +93,12 @@ pub fn destroy(interface: *Interface, allocator: std.mem.Allocator) VkError!void
if (config.debug_allocator) {
// All device memory allocations should've been freed by now
if (!self.device_allocator.detectLeaks()) {
const leaks = self.device_allocator.detectLeaks();
if (leaks != 0)
std.log.scoped(.vkDestroyDevice).err("Device was destroyed leaking {d}KB", .{@divTrunc(leaks, 1000)})
else
std.log.scoped(.vkDestroyDevice).debug("No device memory leaks detected", .{});
}
self.device_allocator.deinitWithoutLeakChecks();
}
allocator.destroy(self);