在 Chrome DevTools 中测试内存泄漏(在几次附加/分离 jQuery 插件之后)我发现有一些 delta 对象,但我无法理解它们的性质:
什么是feedback_cell
关于哪些报告 DevTools?我的代码中没有这样的标识符(这里是 BsMultiSelect.js)。
行号指向方法定义:function staticContentGenerator(...) {
我猜 feedback_cell
是来自内部 js 结构的东西,但我找不到任何关于它的东西。
如何处理这样的痕迹?
最佳答案
有同样的问题,但是这篇文章帮助我理解了什么是feedback_cell
https://rohitwhocodes.wordpress.com/2020/08/20/feedback-vectors-in-heap-snapshots/
TLDR;
How do feedback vectors affect memory investigations?
They are a red herring and if you see a feedback_cell in the retainer list that you are investigating, you can safely assume this specific retainer list is not the cause of the leak.
You can think of feedback vectors are soft references and hence it is safe to ignore them as a cause of a memory leak.
更新 :正如塞巴斯蒂安在评论中所说
关于javascript - Chrome DevTools,内存 : what is `feedback_cell` and how to resolve memory leak that traces to it?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60384491/