On top of that, Microsoft Task Manager doesn't really deal well with a
managed environment, in fact, it kinda sucks in general. When .NET releases
memory Task manager doesn't really catch it sometimes, or whats reported as
being released and really is sometimes varies.
With those other links given to you you will also see tht GC invokes about
once every 47 seconds... How this number came to be, I don't know, but
almost every GC test I see always results to about that number.
cooky..
You can always get your memory usage by using
GC.GetTotalMemo ry(False)
I use .NET Memory Profiler by scitech, great tool...
"David Schwartz" <da**@hr-symphony.com> wrote in message
news:ez******** ******@TK2MSFTN GP09.phx.gbl...
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(B yVal sender As System.Object, ByVal e As
System.EventArg s) 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!