call env.lowMemoryNotification() during page reset

calling env.lowMemoryNotification() on page reset encourages v8 to free
memory and keep low usage.
This commit is contained in:
Pierre Tachoire
2026-01-20 18:25:58 +01:00
parent ca60aa1cc6
commit 8ceaf0ac66

View File

@@ -225,6 +225,7 @@ fn reset(self: *Page, comptime initializing: bool) !void {
self._session.browser.http_client.abort();
self._script_manager.deinit();
_ = self._session.browser.page_arena.reset(.{ .retain_with_limit = 1 * 1024 * 1024 });
self._session.browser.env.lowMemoryNotification();
}
self._factory = Factory.init(self);