My 5 cents:
Garbage collection is explained very well here:
https://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29[
^].
As you can see, it all is based on the concept "unreachable", which is not trivial at all:
https://en.wikipedia.org/wiki/Unreachable_memory[
^].
Say, take 3 objects: A references B, B references C, C references A. If you lose any other references to all of them, will they be garbage collected? They do hold each other. Yes! GC is intellectual enough to resolve all such situations.
Now, it all is unrelated to
IDisposable.Dispose
which can be implemented by any type, to handle some clean-up actions called
explicitely (reclaiming of unmanaged resources is only one of possible applications, it can be anything; for example, setting a mouse cursor to its default glyph), in contrast to constructors which you never call in the application code. Generally, there is a very little use of constructors in managed code, because GC can cope with most situations without them, and because the moment of time of the constructor call is not controllable by the application. So, constructors can be called in "I don't care when" situations.
As to "
using
" statement (not to be mixed up with with "
using
"
directive), this is nothing but
syntactic sugar for calling
IDisposable.Dispose
, very convenient though.
Please see:
https://msdn.microsoft.com/en-us/library/system.idisposable%28v=vs.110%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/yh598w02.aspx[
^].
—SA