[2005] Me.Close vs. Me.Dispose
In my MDI app, I'll often need to show a form modally (Form.ShowDialog). What I have noticed is that when I close the form with Me.Close, and then open that form again, it appears that not all of the module-level variables have been cleared (i.e. there are "holdovers" from the previous time the form was open). But when I close with Me.Dispose, I do get the expected result, i.e. subsequent times the form is open, it starts "fresh" as desired. However, Me.Dispose causes an annoying flicker when the form closes. What is the "best practice" here?
Re: [2005] Me.Close vs. Me.Dispose
It sounds like its a GarbageCollection issue as th GC doesnt run exactly right after a object is closed which calls its dispose but perhaps not right away is what you are seeing.
If there are any references to this object then that too can hold up the cleanup. Are these variables on the form or in a separate class? What about using them as properties of the form?