Limit the number of pooled objects

This commit is contained in:
Jarred Sumner
2022-02-01 20:47:35 -08:00
parent 170e58a99d
commit 213960a04a
12 changed files with 61 additions and 14 deletions

View File

@@ -784,7 +784,7 @@ pub const DescribeScope = struct {
this.tests.deinit(getAllocator(ctx));
}
const ScopeStack = ObjectPool(std.ArrayListUnmanaged(*DescribeScope), null, true);
const ScopeStack = ObjectPool(std.ArrayListUnmanaged(*DescribeScope), null, true, 16);
// pub fn runBeforeAll(this: *DescribeScope, ctx: js.JSContextRef, exception: js.ExceptionRef) bool {
// var scopes = ScopeStack.get(default_allocator);