Reputation: 3251
I've been having some trouble using Web Browser Control, my program continues to scroll down the page forever scraping data.. or until I get a OutOfMemoryException, even though I have plenty of RAM left.
I was thinking after so much scrolling, I should dispose of the Web Browser and then "re-create", or "reuse" again, releasing all previous memory used by it.
When i try to dispose of it through, WebBrowser1.Dispose()
I can then no longer navigate using WebBrowser1.Navigate(URL)
How would I be able to use it, or re-create WebBrowser1 after disposing of it.
Any help would go a long way, thank you.
Upvotes: 1
Views: 1453
Reputation: 52
Try it before use WebBrowser1.Navigate(URL):
WebBrowser1 = New WebBrowser
Upvotes: 2