Suppose I have 2 objects - object A and object B. Object A of the link Object B and object B of the link Object A.
- If both objects A and object B do not match the code, how does the garbage collector know that it can be collected.
- How did the garbage collector deduce that any object is out of scope / ready to collect garbage?
- How about whether Object A will not match our code, but it can still be independent. For instance. if it is a form class, then it can start on its own, even if object A is reinitialized in a new instance or specified zero.
source share