How does tricolor garbage collection work?
Golang’s garbage collector uses a “tricolor” algorithm, dividing heap objects into black, white, and grey sets. The algorithm can run concurrently with the program, and the “tricolor” invariant ensures no pointers go directly from the black set to the white set, allowing the white set to be cleared. 2016-11-11