views:

134

answers:

0

I'm working on a .NET application that loads web pages using multiple WebBrowser controls. There are several threads and WebBrowser controls involved (this is a server application), each thread creating a WebBrowser control and running a message loop for it.

My question/issue is related to the WebBrowser control. Every time a web page is loaded, the (Windows) handle usage for the process increases. The WebBrowser controls are disposed when no longer needed, but for some reason the handle count doesn't seem to decrease. The application handle usage grows to more than 15000 in less than 10 minutes.

While checking with Sysinternals Process Explorer I noticed most of the handles seem to be Thread handles (on a multi core server). On a single core machine it also reports lots of Event handles.

Is the WebBrowser control known to be leaking handles ? And are there any methods to detect the cause of the handle leak ?

(I tried WinDbg, but haven't had much success due to not having any experience in using it. Memory/Performance profilers don't reveal any managed resource leaks.)

This is my first question here, please excuse any mistakes.