mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
main: exit 1 on memory leak detection
This commit is contained in:
@@ -52,7 +52,7 @@ pub fn main() !void {
|
||||
const alloc = if (builtin.mode == .Debug) gpa.allocator() else std.heap.c_allocator;
|
||||
|
||||
defer if (builtin.mode == .Debug) {
|
||||
_ = gpa.detectLeaks();
|
||||
if (gpa.detectLeaks()) std.posix.exit(1);
|
||||
};
|
||||
|
||||
var args_arena = std.heap.ArenaAllocator.init(alloc);
|
||||
|
||||
Reference in New Issue
Block a user