here so more info for the vb6 coder
http://www.dotnet2themax.com/blogs/fbalena/PermaLink,guid,47466ad4-77d4-46b0-a6f9-1d677417ed1f.aspx
I like the shown generic routine in the above link verry much although it
does set the object to Nothing after the call to Dispose i guess that the
writer of the official MS Press Core reference guides VB pre .Net and
VB.Net versions knows what he is doing .
Stephany Young wrote once an answer here in the Groups regarding this topic
that i like verry much
<<<<
You will get as many different answers as ther are programmers, however, the
short answer is No.
Now let me qualify that.
No, you are not required to assign Nothing to an object to 'destroy' it.
In general, when an object goes 'out of scope' it will become available for
garbage collection and the Garbage Collector will 'clean it up' when it gets
around to it.
There are some classes in the Framework where you MUST 'destroy' an instance
of it yourself. Off the top of my head, the WebRequest class is one.
Some classes expose a Dispose method. This indicates that an instance of the
class may make use of some unmanaged resources that need to be cleaned up.
For such objects you need to call the Dispose method of the object rather
than assigning Nothing to the object.
My recommendation is to NOT explicity 'destroy' objects at this stage of
your learning curve.
As you progress you will soon learn which objects you need to 'destroy'
whether it be by assigning Nothing or calling the Dispose method.
That said, you are free to explicity 'destroy' objects, a'la VB6, if you so
choose.
In short what she is saying is that for your own ease of mind do not do it
as it might confuse you and just let the framework handle it for you
in the whole Noting VS not to Nothing battle i think it is a good and valid
answer
My personal opinion is that it doesn`t hurt but that it also doesn`t give
you a benefit in doing so in most situations it just adds a lot of confusion
and in only rare cases you might find a construction where it is necesary
but you might think if the whole construction is written thoroughly, having
said so this is where the nothing can come perfectly valid in its use (
when third party coders messed things up )
regards
Michel Posseth