what is VB.Net (I use VB 2005 which is supposivly .Net) equivilent to VB6's Unload Me function?
Printable View
what is VB.Net (I use VB 2005 which is supposivly .Net) equivilent to VB6's Unload Me function?
A complete list of these things is located here, but what you want is Me.Dispose
Thank alot :p
Hi,
I understood that
Me.Close
was more efficient than
Me. Dispose,
as Close includes Dispose and also releases all the forms resources.
And by resources I hope you mean RAM. But I myself watched in the Task Manager. And when a new form was loaded 700KB went up.
But when I clicked exit (Me.Dispose) it stayed the same.
I think how quickly the resources [RAM] are reclaimed depends on the Gabage Collector [GC].
It depends on which controls you have on your form. For eg. number spinner control, etc. dont get disposed automatically with Garbage collector. Hence the form also is not disposed as it still have control(s) on it. Hence, the form remains in Memory.
Regards
Anyway to free up the RAM after a form is done?
I'm no expert in writing Garbage collectors....
but from everywhere I have read... they all say this:
Don't try to outguess the compiler AND Don't try to outguess the garbage collector.
Basically, YOU don't have to do anything to reclaim the RAM, let the GC worry about it. When the system needs it, it will get it.
You're right nemaroller!