Tri-colour marking is a tracing algorithm used by garbage collectors. Which involves marking objects in colours: white, grey and black.

  1. White objects are not processed by the Garbage collection
  2. Grey objects are discovered and reachable from the roots
  3. Black objects are reachable and fully processed   - It’s descendants are also reachable