Ajay Mathpati


Scenario -

- I am using WebBrowser control to navigate different pages. Its an MFC application.

- These pages also contains references to Java Script and images.

Problem -

- When the page is navigated using Navigate method it occupies certain amount of memory, which is obvious. However, it doesn't release it when WebBrowser control is destroyed.

- I also created a small dialog based application and embedded IWebBrowser conrol in it. I browsed a blank page using Navigate method, more than 2000kb virutal memory was occupied as per the Task Manager. After destroying the IWebBrowser control, the memory occupied was not released.

Is it a memory leak or a IWebBrowser problem. If so how to release the occupied memory

Your help in this regard woul be highly appreciated.

Thanks and Regards,

-Ajay Mathpati

Re: Internet Explorer Web Development IWebBrowser-control memory leak.

Stephane VB


I'm not a specialist in MFC app but if you use IE try this link to increase your memory leak investigation :

http://outofhanwell.com/ieleak/index.php title=Main_Page

You 'll find a tool and different links about Fixing Leaks.

Re: Internet Explorer Web Development IWebBrowser-control memory leak.

Ajay Mathpati

Hi Stephane,

Thanks a many. The links are definitely useful. Most of it covers regarding the Circular references. I will check if my Javascripts have any, and will try to apply the solution given.

However, what about the second problem that I have mentioned, where I have created the dialog based application. In this dialog, the webbrowser doesn't use any page or Java script. But still the IWebBrowser shows the leak, even if u browse just the "about:blank" link.

Is there any solution for this . This seem to be the genuine leak of IWebBrowser control.