简体   繁体   English

括号在chrome devtools内存标签中的含义

[英]What the parentheses means in chrome devtools memory tab

I am checking memory leak of my project, when i make an allocation instrumentation on timeline, I find the most of leak are in parentheses, like (array), (compiled code) and (system). 我正在检查项目的内存泄漏,当我在时间轴上进行分配检测时,我发现泄漏最多的是括号,例如(array),(compiled code)和(system)。 记忆标签

What is the difference between (array) and Array? (array)和Array有什么区别?

They represent "group" entries as the Constructor column (and others) show "totals". 它们代表“组”条目,因为“构造函数”列(和其他列)显示“总计”。 So that column represents a number of Objects of a certain type that have been constructed in code. 因此,该列表示已用代码构造的一定类型的许多对象。 If there are not parentheses, then a DOM Element or Document fragment is represented there. 如果没有括号,则表示DOM元素或文档片段。

It should make sense then that all memory leaks are found in those "groups". 这样就应该在那些“组”中找到所有内存泄漏。

For a clearer explanation I recommend you review the docs found here: 为了获得更清晰的解释,我建议您查看此处找到的文档:

https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots#summary_view https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots#summary_view

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM