News for hackers. Stuff that matters.
Re:Die, You Gravy Sucking Pig Dog by bdfh42 on Thursday January 15, 2009 @09:45AM (#435172)
With regard to:

sqlConnection.Close(); sqlConnection.Dispose(); sqlConnection = null;

The irony is that the .NET Framework and it's compilers are very good at optimisation and will almost certainly make the object available for garbage collection at the first opportunity - with a good chance that the second two statements would not even make it into the assembly.

Re:Die, You Gravy Sucking Pig Dog by statictype on Thursday January 15, 2009 @10:49AM (#435244)
I haven't dealt with this stuff in some time, but I recall that those last two statements are actually needed. I think it was a work-around for a bug\design-flaw in the earlier .NET garbage collector.

That last bit on explicitly assigning to null was really weird but in some cases, necessary.