In the previous chapter we have gained knowledge about some general GC topics, like when it is triggered and how it decides which generation should be collected. Let’s now move into the details of implementation of the first main GC phase - Mark phase.
At this stage, GC decided which generations will be collected. It’s time to investigate which objects may be reclaimed. As mentioned before, CLR implements a tracing Garbage Collector. It starts from various roots and recursively traverses a whole object’s graph of the current program state. All those that are not reachable from ...