-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[js] 第32天 造成内存泄漏的操作有哪些? #116
Comments
以前使用"引用计数"的时候, 还挺多的, 我觉得比较可能的是, 创建了时间循环, setInterval, 但是没有没有释放掉, 这个比较容易造成内存泄漏 |
|
递归,循环引用,闭包 |
现在的GC好像是越来越牛逼了,有时候感觉无效的闭包都能被回收掉(还没有做过测试) |
|
GC回收有两种实现方式:标记清除、引用计数 |
死循环 |
闭包 |
|
闭包、死循环、定时器。 |
1 similar comment
闭包、死循环、定时器。 |
在JavaScript中,可能会出现内存泄漏的操作有以下几种情况:
为了避免内存泄漏,可以采取以下措施:
通过合理的内存管理和资源释放,可以避免内存泄漏问题,提高应用程序的性能和稳定性。 |
第32天 造成内存泄漏的操作有哪些?
The text was updated successfully, but these errors were encountered: