Internet Explorer: Memory (Private Working Set)

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Internet Explorer: Memory (Private Working Set)

18 Nov 2019, 10:50

I have a script that: uses Internet Explorer to navigate to various urls, does stuff, then closes.
But the Memory (Private Working Set), as seen in Task Manager, rises quite rapidly.
The memory increases steadily for each url, but never appears to decrease.
It soon reaches figures of about 1.4 GB, and becomes unstable.

As a workaround, every so often, I discard the current IE object, and create a new one.
I wondered if there were any other ways to 'reset' the memory, back towards zero. Thanks.

Code: Select all

q:: ;internet explorer - navigate to multiple urls (in the same tab)
oWB := ComObjCreate("InternetExplorer.Application")
oWB.Visible := -1 ;True

vUrl1 := ""
vUrl2 := ""

Loop 2
	vUrl := vUrl%A_Index%
	while oWB.busy || oWB.readyState!=4 || oWB.document.readyState!="complete" ;READYSTATE_COMPLETE := 4
		Sleep, 10

	;do stuff
	Sleep, 2000

oWB := ""

IWebBrowser2 interface (Windows) | Microsoft Docs
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: artur1884, boiler, Flipeador, pirron, recyclingeek, RubbeH and 49 guests