Remove --gc_hints option, apply the --gc_hints behavior by default

This commit is contained in:
Karl Seguin
2025-05-23 14:15:55 +08:00
parent 46c6a0b4ff
commit b1d0368479
5 changed files with 5 additions and 32 deletions

View File

@@ -269,10 +269,9 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
}
// V8 doesn't immediately free memory associated with
// a Context, it's managed by the garbage collector. So, when the
// `gc_hints` option is enabled, we'll use the `lowMemoryNotification`
// call on the isolate to encourage v8 to free any contexts which
// have been freed.
// a Context, it's managed by the garbage collector. We use the
// `lowMemoryNotification` call on the isolate to encourage v8 to free
// any contexts which have been freed.
pub fn lowMemoryNotification(self: *Self) void {
var handle_scope: v8.HandleScope = undefined;
v8.HandleScope.init(&handle_scope, self.isolate);