Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

77.[html]内存管理? #77

Open
webVueBlog opened this issue Mar 18, 2020 · 1 comment
Open

77.[html]内存管理? #77

webVueBlog opened this issue Mar 18, 2020 · 1 comment
Labels
web综合 web综合

Comments

@webVueBlog
Copy link
Member

No description provided.

@webVueBlog webVueBlog added the web综合 web综合 label Mar 18, 2020
@webVueBlog
Copy link
Member Author

1、什么时候触发垃圾回收?
垃圾回收器周期性运行,如果分配的内存非常多,那么回收工作也会很艰巨,确
定垃圾回收时间间隔就变成了一个值得思考的问题。
IE6 的垃圾回收是根据内存分配量运行的,当环境中的变量,对象,字符串达到
一定数量时触发垃圾回收。垃圾回收器一直处于工作状态,严重影响浏览器性能。
IE7 中,垃圾回收器会根据内存分配量与程序占用内存的比例进行动态调整,开
始回收工作。
2、合理的 GC 方案:(1)、遍历所有可访问的对象; (2)、回收已不可访问的对象。
3、GC 缺陷:(1)、停止响应其他操作;
4、GC 优化策略:(1)、分代回收(Generation GC);(2)、增量 GC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web综合 web综合
Projects
None yet
Development

No branches or pull requests

1 participant