Assigning objects to nil after using 'close' function

Is there any need to assign an object to nil after using it’s ‘Close’ function, for example with TextOutputStream. Is there any point in saying:

dim t as new textoutputstream
t.close
t = nil

instead of:

dim t as new textoutputstream
t.close

Does assigning the property to nil do anything and if I am declaring the variable in code, won’t t be cleared from memory when the method has finished execution.

Thanks

[quote=45870:@Oliver Scott-Brown]Does assigning the property to nil do anything
[/quote]
In some cases, it does. An example is that streams are sometimes locked until the reference dies, even after Closing them. So if you want to open the same file within your method, you sometimes have to nil the first reference before opening the second.

Yes.

You might be better off with

dim t as new textoutputstream t = nil

as closing it but NOT nixing it can lead to code like

[code]dim t as new textoutputstream
t.close

… some time later…

t.write
[/code]

without a commensurate error or indication of what went wrong
At least if t is nil you get an exception ASAP