Optic Tygre,
Questions about the dispose becomes mostly a kind of religious debates in
these Net newsgroup.
First the dispose and the GC are only slightly related to each other.
Dispose is not what some people think the Finalize method from Net
The command is only telling to the GC that an object is ready go get
investigated, next time that the GC is running, if it can be finalized. If
that is not possible, than nothing happens. And because of the fact that
mostly Idisposable is implemented and the dispose is explicitly done, in my
opinion in most cases where it can be done (not all) a little bit senseless.
The GC does it himself without the dispose as well, however that can be a
little bit late. I have add a link about that at the end.
Some people who don't understand the dispose (what I do also not completly)
make it themselves easy. They write: "Just call it when you see it, they
did not make it for nothing". However it is in almost every class because
the dispose is inheritted from component model, from which almost all
system.controls and system.data classes inherit.
I don't do in every program as well not something with "Equals", just
because it exist in every class.
See this message from Jay sent some days after a very heat discussion about
this subject.
http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb/msg/3e55c043b1e6ae59?hl=en
Reading a little bit through the lines where Jay is not sure himself,
describes it the problem good. I have until now not seen something betters,
and almost forever ends an artickle with that text "When you are not sure,
just use dispose" What makes that the writter is for me not sure from
himself.
About the GC is a very nice description in this and the next topic of that
page.
http://msdn.microsoft.com/architect...ml/scalenetchapt05.asp#scalenetchapt05_topic9
I hope this helps,
Cor