?
Solved

WebBrowser control - memory leak,or?

Posted on 2006-05-01
5
Medium Priority
?
1,430 Views
Last Modified: 2009-12-17
Hello,

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,
Goran
0
Comment
Question by:CoolMagic
5 Comments
 
LVL 19

Expert Comment

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

http://support.microsoft.com/default.aspx?scid=kb;en-us;893629
0
 
LVL 29

Accepted Solution

by:
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
0
 

Author Comment

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

Expert Comment

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


Good Luck
-Brian
0
 

Expert Comment

by:JPMC_SIT
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:
Me.Webrowser1.Navigate("http://url")  
   I use:
Me.Webrowser1.Navigate("javascript:window.location.replace('http://url');")

It works for me, anyway
0

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