mcgin1591

Alright i have a webbrowser. its pretty big, and i can see that it should use around 70k. but everytime i go to a new webpage it will raise. everytime. and it wont release anything. i reduced my resources, it helped a little. i was thinking about when my browser loads, how could i get it to just load the main form. and then load the others if opened. and if they are closed, then release them so i can get memory back i am wondering this because i will get error reports alot and my browser will close like every 10 minutes...


Re: Visual Basic Express Edition Application releasing and memory usage, help?

Paul Montagna

Try using the dispose method and see if that helps.

Code Snippet

WebBrowser1.Dispose()


That before you navigate the next url.





Re: Visual Basic Express Edition Application releasing and memory usage, help?

mcgin1591

alright i will. i have a tabbed webbrowser. could it have anything to do with unmanaged code




Re: Visual Basic Express Edition Application releasing and memory usage, help?

mcgin1591

yea i tried that. what can i put in this code it said cannot get dispose object. but here is the code i have to put it in for navigating

Private Sub wb_NavigatingExtended(ByVal sender As Object, ByVal e As WebBrowserNavigatingExtendedEventArgs) Handles wb.NavigatingExtended

Dim strFile As String

For Each strFile In My.Settings.DLFiles

If e.Url.EndsWith(strFile) Then

If DownloadHistory.DH.Items.Contains(e.Url.ToString) Then

DownloadHistory.DH.Items.Clear()

My.Settings.DLHistory.Clear()

DownloadHistory.DH.Items.Add(e.Url.ToString)

ElseIf Not DownloadHistory.DH.Items.Contains(e.Url.ToString) Then

DownloadHistory.DH.Items.Add(e.Url.ToString)

End If

End If

Next

If Me.TemporarilyAllowPopupsTool.Checked = True Then

Ibrowser.EnablePopupBlockerTool.PerformClick()

Me.TemporarilyAllowPopupsTool.Checked = False

End If

Ibrowser.Dispose()

End Sub






Re: Visual Basic Express Edition Application releasing and memory usage, help?

Feng Chen - MSFT

Hi mcgin1591,

I'm not sure about what you mean by "it said cannot get dispose object". Could you please clarify

Thanks!






Re: Visual Basic Express Edition Application releasing and memory usage, help?

mcgin1591

This problem has been solved. Big Smile






Re: Visual Basic Express Edition Application releasing and memory usage, help?

Feng Chen - MSFT

Hi mcgin1591,

We will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Thank you!