| | |
WebBrowser control resource leak
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
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.
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
- WPF WebBrowser Control (C#)
- WebBrowser Control through Hide-My-IP (VB.NET)
- VB.net WebBrowser Control Error on Twitter.com (VB.NET)
- WebBrowser Control - Saving Source (C#)
- WebBrowser Control (C#)
- IWebproxy and Webbrowser Control (VB.NET)
- How to change bgcolor of webbrowser control? (C#)
- Can images be auto-resized while using the WebBrowser control in VB5 (Visual Basic 4 / 5 / 6)
- Using WebBrowser Control in Win32 (C)
Other Threads in the C# Forum
- Previous Thread: Syntax error in INSERT INTO statement
- Next Thread: OnBeforeNavigate2 & DOM ready?
| Thread Tools | Search this Thread |
Tag cloud for .net, leak, webbrowser, winforms
.net 3.5 7 2008 account apple appliances application appportability array asp beginner broadcast bugs build c# c/c++ center chrome client code commerce consultant database datagrid datalist delete deploy deployment developer development e-commerce ecommerce erp error file firefox flash form framework freelancer gecko google httpwebrequest image internet internetexplorer java javaee javascript leak linq linux manchesterunited marshalbyrefobject memory mono mozilla mssqlbackend mysql news novell partnership peertopeervideostreaming phishing php platform post postbuild problem projects remoting safari security server silverlight softwaredevelopment sp1 sql survey suse tcpclientchannel unix user useraccounts vb vb2008 vdc/os virtual virtualization vista vs2008 webbrowser websitedevelopment win7 windows windows7 winforms wpf xenocode






