D
David Schwartz
Has anyone noticed memory leaks in their VB.NET Windows Forms apps? My app
definitely has some memory leaks, so I did a simple test to see if it was my
app or something about VB.NET.
I created a test app with 2 forms. Form1 has a command button with the
following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim x As New Form2
x.Show()
End Sub
Watching the memory usage, I see that the used memory goes up between 10-20K
when I click the button to show Form2. When I close Form2, the memory is
not reclaimed.
Is there something I need to do to reclaim memory when closing a form?
Thanks!
definitely has some memory leaks, so I did a simple test to see if it was my
app or something about VB.NET.
I created a test app with 2 forms. Form1 has a command button with the
following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim x As New Form2
x.Show()
End Sub
Watching the memory usage, I see that the used memory goes up between 10-20K
when I click the button to show Form2. When I close Form2, the memory is
not reclaimed.
Is there something I need to do to reclaim memory when closing a form?
Thanks!