本文介绍了哪些现代浏览器使用“标记扫描"算法进行垃圾收集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在进行垃圾收集时,我遇到了引用计数 Mark&扫描 GC算法.
网上的一些研究表明,引用计数已成为过去,如今的大多数浏览器都采用了标记和扫描".根据文章此处

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:

  1. 除了周期性依赖之外,还有其他原因导致我们脱离引用计数而采用Mark& ;?扫一扫?
  2. 所有现代浏览器(Chrome | Firefox | Safari | Edge | IE)是否都使用标记并扫描"?

推荐答案

引用 MDN

这篇关于哪些现代浏览器使用“标记扫描"算法进行垃圾收集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 06:19