Tri-colour marking is a tracing algorithm used by garbage collectors. Which involves marking objects in colours: white, grey and black.
- White objects are not processed by the Garbage collection
- Grey objects are discovered and reachable from the roots
- Black objects are reachable and fully processed - It’s descendants are also reachable