Reduce memory usage in long-running processes (#14885)

This commit is contained in:
Jarred Sumner
2024-10-29 12:56:10 -07:00
committed by GitHub
parent d5f9978007
commit b5a73130ad
16 changed files with 120 additions and 60 deletions

View File

@@ -3146,8 +3146,8 @@ pub fn NewRefCounted(comptime T: type, comptime deinit_fn: ?fn (self: *T) void)
const ptr = bun.new(T, t);
if (Environment.enable_logs) {
if (ptr.ref_count != 1) {
Output.panic("Expected ref_count to be 1, got {d}", .{ptr.ref_count});
if (ptr.ref_count == 0) {
Output.panic("Expected ref_count to be > 0, got {d}", .{ptr.ref_count});
}
}