mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
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:
@@ -225,6 +225,7 @@ fn reset(self: *Page, comptime initializing: bool) !void {
|
|||||||
self._session.browser.http_client.abort();
|
self._session.browser.http_client.abort();
|
||||||
self._script_manager.deinit();
|
self._script_manager.deinit();
|
||||||
_ = self._session.browser.page_arena.reset(.{ .retain_with_limit = 1 * 1024 * 1024 });
|
_ = self._session.browser.page_arena.reset(.{ .retain_with_limit = 1 * 1024 * 1024 });
|
||||||
|
self._session.browser.env.lowMemoryNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
self._factory = Factory.init(self);
|
self._factory = Factory.init(self);
|
||||||
|
|||||||
Reference in New Issue
Block a user