Webbrowser.dispose taking more CPU

easy2earn

Regular Member
Joined
Jun 5, 2013
Messages
297
Reaction score
57
I am in a process of developing windows application/bot,where I can open a new form and then a webbrowser, execute tasks and close the webbrowser as well as form
webbrowser.dispose taking too much of CPU and System crashes after loop of 100 times
I want to repeat the process for 300+ time


My requirement is to close the webbrowser and release it from memory each time before form closes.

Any help is highly appreciated, as I am new to windows programming and struck up with this for the last 2 days and google search results are more confusing.
 
can you show us the code so we can figure out what's wrong..
 
You might have addons/extensions for IE loading (which in turn create massive memory leaks).
If those are present, try uninstalling them.
 
This won't be very fast, but after about 50 loops execute:

Code:
Diagnostics.System.Proccess.Start ("taskkill -f /im iexplore.exe")
 
not sure if you've been able to solve it but just FYI.

.net automatically disposes objects once they are out of the scope. Unless you are performing unmanaged code, the garbage collector should drop by to clean up your memory once you have not enough left. so, explicitely calling dispose may not be necessary.
 
Back
Top