WebBrowser control - memory leak,or?

Posted on 2006-05-01
Medium Priority
Last Modified: 2009-12-17

I have problems using WebBrowser control (mshtml) from my Visual Basic application.
It seems to have a large memory usage,and I don't know what can be done about that.

When I run my program,which uses WebBrowser control,and browse a few pages,memory usage goes to about 20 MBs.
And it grows rapidly.

When I shut down my program,and run it again,the memory usage is almost the same.Seems like everything remains in memory,even if I closed my program.
I have heard that this is a "false" number,that it is not a real memory usage.Is it true?
I searched for a solution on the internet,and saw that other people has the same problem,but I was unable to find a wokring solution.
Does anyone knows ANYTHING about this?

Thank you very  much,
Question by:CoolMagic
LVL 19

Expert Comment

ID: 16582133
Yes a memory leak is present...please see:

LVL 29

Accepted Solution

nffvrxqgrcfqvvc earned 1500 total points
ID: 16584357
Internet explorer always runs around those numbers. If you have ever looked at the process "iexplorer.exe" you will see the memory usage is the same being around 15-25

Author Comment

ID: 16637636
OK guys,I think egl1044 has right.Thank you!
LVL 19

Expert Comment

ID: 16637694
CoolMagic, I'm glad you resolved your issue! But, I would still suggest you read the article I posted.

Good Luck

Expert Comment

ID: 26073410
SOLUTION!  I've battled this problem for what seems like years.  Microsoft's webrowser object lacks vital things like cache and history control.  My work-around is simple...  Rather than navigating to a new page and adding it to the stack (and memory), I use javascript's "replace" function that replaces the current page rather than adding a new one.  For my automation systems, this works great!

So, instead of:
   I use:

It works for me, anyway

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question