While going through garbage collection, I came across Reference Counting
and Mark & Sweep
GC Algorithms.
Some research on the web says that Reference Counting is a thing of the past and most of the browsers today have adapted Mark and Sweep. As per the article here
Since 2012, JavaScript Engine’s have adapted this algorithm over Reference-counting garbage collection.
While I haven't found any standard documentation for the same, I am curioud to know following:
- Was there any other reason other than cyclic dependency that made us move away from Reference Counting and adopt Mark & Sweep?
- Do all modern browsers (Chrome | Firefox | Safari | Edge | IE) use Mark and Sweep?