0

It's not entirely clear to me how garbage collector works for js.

Do all modern browsers work according to Mark-and-sweep algorithm (Chrome, Firefox ...)?

MDN

Internet Explorer 6 and 7 are known to have reference-counting garbage collector for DOM objects. Cycles are a common mistake that can generate memory leaks.

It seems to me that only IE works according to reference-counting garbage collector. Is it true?

Ivan
  • 478
  • 2
  • 13
  • Well, [this](https://stackoverflow.com/questions/56218239/which-modern-browsers-use-mark-and-sweep-algorithm-for-garbage-collection) seems to be really relevant here. – raina77ow Apr 14 '21 at 05:37
  • Does this answer your question? [Which modern browsers use Mark and Sweep Algorithm for Garbage Collection?](https://stackoverflow.com/questions/56218239/which-modern-browsers-use-mark-and-sweep-algorithm-for-garbage-collection) – 3x071c Apr 14 '21 at 06:55
  • So, I see that I was right – Ivan Apr 14 '21 at 08:07

0 Answers0