How smart is Garbage Collection when it comes to nested references?
Take this code for example:
Public Class SomeClass
Private m_SomeOtherClass(Me)
End Class
I know that GC works by looking at how many references remain, and any object without any references ends up getting dumped. So in this case, where there's a reference coming from a member variable, is that a memory leak waiting to happen (unless you implement IDisposable, etc)?
Right now I'm assuming that the GC is smart enough for this, since it could probably check to see if any references are coming from the object itself, and just not count them towards the reference count. But I thought I would dig a little.