My problem is that I created a simple application where I have webrowser control. It navigates every 20 seconds to a new site. After some number of navigations memory occupied by the application increases. I tried to dispose, delete and create again the webrouser control, but couldn't succeed. The only way to release all resources of the application is reboot it. I spent lots of effort trying to solve this problem. Please, give me some hints or links where I can read about it. Thanks in advance.
The actual code is much bigger than the demonstrated one, but the idea is the same. Code looks like this:
for (int i = 0; i < 100000; i++)
{
webBrowser1.Navigate("http://stackoverflow.com");
Wait(20000);
}
Method definition:
private void Wait(long value)
{
Stopwatch sw = new Stopwatch();
sw.Start();
while (sw.ElapsedMilliseconds < value)
Application.DoEvents();
}
Problem is not actual now because the solution is found by using another browser control named WebKitBrowser. Thanks for all who tried to help me. It was my first question on this briliant site. I liked it very much.