944,123 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 2267
  • C# RSS
Nov 8th, 2009
0

WebBrowser control resource leak

Expand Post »
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, and the WebBrowser is required for capturing the rendered image), 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.)

Thanks in advance.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
webspy is offline Offline
13 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Syntax error in INSERT INTO statement
Next Thread in C# Forum Timeline: OnBeforeNavigate2 & DOM ready?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC