Steve,
I would want to see some research indicating that this is a good practice
"in general". Among other things, there may well be more overhead in
individually setting variables to null than in waiting until they go out of
scope all at once.
Also, our brains only have so much bandwidth. I'd rather spend mine on
writing code which actually _does_ something rather than on remembering to
figure out when I'm "done with" some variable just so I can give the garbage
collector a few more milliseconds to clean up a few thousand bytes on a 2Gb
server system - a few milliseconds it will probably not take advantage of.
Old folks like me need to be careful not to teach the kids our old bad
habits - even those which used to be good habits. The world has changed too
much to remain static. Machines have grown much faster and have larger
memories, and a lot of the habits I learned as a "kid" just don't matter
now. If I'd been learning today instead of 25 years ago, I would not have
been taught to set variables to null after use. I'd wonder what the big deal
was and why we couldn't just wait the few milliseconds until the end of
scope to get allow the Garbage Collector to collect this few megabytes in a
couple of seconds.