Smitty wrote:
in a sub i'm using dim mydialog as openfiledialog and the rest of the
code follows.
everything works fine on the surface but....
Does openfiledialog have a Close() method?
If so call it, then check the documentation for that method as to
whether it calls Dispose for you.
Failing that ...
Does openfiledialog have a Dispose() method?
If so, call it.
The *convention* is that the Dispose method should release any
/unmanaged/ resources that the class makes use of. If you don't call
Dispose, then the chances are it will get called for you when the object
gets "Finalized", but that may not happen for quite some time (possibly
not until the entire process ends).
So - yes, I'd say you probably /ought/ to but, if Our Friends in Redmond
have done their jobs right, it shouldn't make any difference.
HTH,
Phill W.