Home > Archive > Visual Basic > December 2007 > Help with webbrowser navigate memory problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Help with webbrowser navigate memory problem
|
|
|
| The following simple code loops navigating to a webpage. The memeory used
continues to grow over time. How can I release the memory or stop the
program from continually grabbing memory? This is a simple test that shows
the problem I am seeing in my real application.
Is this a memory leak or just Windows? Regardlous, I need to fix the
"feature". Not all sites show this problem. If the program navigates to
www.microsoft.com I dont see memory climb. What is going on and how can I
fix it? My real applications runs for hours and accesses a webpage many
times and the memory used keeps climbing until an out of memory error
occurs.
Using VB6 with all updates to IE6.
Drop a webbrowser control on a form and a command button.
In a module
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
in main form
Dim blnDone As Boolean
Dim blnRunState As Boolean
Public Enum BrowserNavConstants
navOpenInNewWindow = 1
navNoHistory = 2
navNoReadFromCache = 4
navNoWriteToCache = 8
End Enum
Private Sub Command1_Click()
Dim strURL As String
blnRunState = vbTrue
Do While blnRunState = vbTrue
strURL = "http://www.ebay.com"
WebBrowser1.Silent = True
WebBrowser1.Navigate2 strURL, navNoHistory Or navNoReadFromCache
Or navNoWriteToCache
blnDone = vbFalse
Do While blnDone = vbFalse ' check flag till complete
DoEvents
Sleep 100
Loop
Sleep 5000
Loop
End Sub
TIA
| |
| squishey 2004-10-22, 12:28 pm |
| Hello,
Have you had any luck with this? I have come across the same problem and I have not been able to get around it either.
cheers | |
|
| squishey <squishey.1ejptv@mail.codecomments.com> wrote in
news:squishey.1ejptv@mail.codecomments.com:
> Have you had any luck with this? I have come across the same problem
> and I have not been able to get around it either.
>
> cheers
> --
> squishey
Seems one of the latest ms updates fixed the problem.I never saw any
mention of the problem by ms.
| |
| squishey@gmail.com 2005-01-20, 3:55 pm |
| > Seems one of the latest ms updates fixed the problem.I never saw any
> mention of the problem by ms.
What update was this? didnt hear anything about it either. is it
working for you?
| |
|
| squishey@gmail.com wrote in
news:1106243275.946353.3900@z14g2000cwz.googlegroups.com:
>
> What update was this? didnt hear anything about it either. is it
> working for you?
>
>
No it didnt work...or better to say it seemed to work for a while. There
is some sort of memory bug in either IE or javascript. Seems to be a MS
problem. I wish they would fix it!
| |
| ventond 2007-10-31, 8:57 am |
| quote: Originally posted by nop90
No it didnt work...or better to say it seemed to work for a while. There
is some sort of memory bug in either IE or javascript. Seems to be a MS
problem. I wish they would fix it!
Here is an even simpler example of the problem.
1 Form. 1 Timer (interval about 3000). 1 WebBrowser Control (index 0)
Private Sub Timer1_Timer()
Static bin As Boolean
If bin Then
Unload WebBrowser1(1)
End If
DoEvents
bin = True
Load WebBrowser1(1)
WebBrowser1(1).Navigate "www.google.com"
With WebBrowser1(1)
.Top = 0
.Left = 0
.Height = Me.ScaleHeight
.Width = Me.ScaleWidth
.Visible = True
End With
End Sub
For me this eats about 7MB every iteration. google loads igoogle.
It seems that some things aren't freed when the webbrowser is unloaded.
Did anybody find a work around/fix? | |
|
|
|
|
|
|
| La_dra_diosa 2007-12-11, 12:45 am |
| adult home ideos com, adult vdeo awards, funny adult pictues, ndue teen video, teen ass videeo, adlut video forum, online adult mmovie, gay men videeos, adult homee videos, smple teen video, gay anal sex video, nakeed teens videos, free teen vieo, gay male porn ivdeos, xxx porn ivdeo.
gay assage video, free adult videoo clip, free fll length porn videos, aadult video post, hentaip orn videos, teens having sex vidoes, hot gay vidoes, anime prn videos, een video, vdieos of porn, hardcore gay viideos, adult video podcast, black oprn video, porn movei, free gay maale video.
adult vido database, not another teen movei soundtrack, aqua teen hunger forcee the movie, porn star viideos, adult video megaplxe, porn ddvd, gay anal videso, agy anal sex videos, funn yadult pictures, ault video hosting, adut video search engine, nude teen vieo, adult vieo hosting, adutl movie sites, teen boy ideos. |
|
|
|
|