Bug: Web browser still leaks under framework 2.0 & studio 2005

  • Thread starter Thread starter Willie jan
  • Start date Start date
W

Willie jan

Why is this bug STILL NOT resolved!

Every time the webbrowser is loaded, navigate2 called and unloaded there is
another handle disappearing...
causing my application to hang after a while.

Willie.

//declaration
Public WebObject As AxSHDocVw.AxWebBrowser

//Load procudure

WebObject = New AxSHDocVw.AxWebBrowser
WebObject.Visible = True
Me.Controls.Add(WebObject)
Me.Visible = True
WebObject.Location = New Point(0, 0)
WebObject.Size = New Size(Me.Width, Me.Height)
WebObject.Silent = True
WebObject.TheaterMode = True
WebObject.Silent = True
WebObject.Resizable = False
Dim O As Object = Nothing
WebObject.Navigate2("www.google.nl", 14, O, O, O)

//unload procedure

Me.Controls.Remove(WebObject)
WebObject.Parent = Nothing
WebObject.CausesValidation = False
WebObject.Controls.Clear()
WebObject.Enabled = False
WebObject.Dispose()
WebObject = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
 
Have you tried calling Marhsal.ReleaseComObject on it? Perhaps that
would help. Also, have you tried the new WebBrowser control? Does
that behave any differently?
 
Back
Top