Let"s not talk about the principle of the train algorithm here.
the train algorithm is the gc algorithm used by the G1 collector
D _ C are three objects that need to be called to each other. There are no other citations. But when the algorithm scans the first block of memory, D has a reference to E, E has a reference to c, and c has a reference to D. Both D and E will remain. On the second scan, C also has a reference to D and is preserved. Isn"t it true that the garbage has not been recycled at all