简体   繁体   English

xCode Instruments Leaks Cycles图上的“no ivar”

[英]“no ivar” on xCode Instruments Leaks Cycles graph

I am using instruments to check my app for leaks and I am trying to learn how to read the leaks cycles data. 我正在使用仪器检查我的应用程序是否泄漏,我正在尝试学习如何读取泄漏周期数据。 I am getting this graph on one of my leaks: 我在我的一个漏洞上得到了这个图:

在此输入图像描述

What is the meaning if the graph ? 图表是什么意思? What does it mean "no ivar" ? 什么意思“没有ivar”?

Thanks 谢谢

Shani 沙尼

The "no ivar" message is similar to looking at the call stack of a program that has its symbols stripped. “no ivar”消息类似于查看其符号被剥离的程序的调用堆栈。 If you were looking at the call stack, you would see a memory address instead of the function name. 如果您正在查看调用堆栈,您将看到内存地址而不是函数名称。 In your example Instruments is showing the addresses, +16 and +24. 在您的示例中,仪器显示地址,+ 16和+24。 Instruments can't find the variable name that allocated the memory so you get the [no ivar] message. 仪器找不到分配内存的变量名,因此您可以获得[no ivar]消息。

I don't have a solution to get Instruments to provide better information. 我没有解决方案让仪器提供更好的信息。 I've never been able to get Instruments to do much with leak cycles. 我从来没有能够让仪器在泄漏周期中做很多事情。

UPDATE UPDATE

If you're trying to find where your code leaks memory, I recommend switching to the call tree view, which you can do from the jump bar. 如果您正在尝试查找代码泄漏内存的位置,我建议您切换到调用树视图,您可以从跳转栏进行操作。 Selecting the Invert Call Tree and Hide System Libraries checkboxes make it easier to locate your code in the call tree view. 选择“反转调用树”和“隐藏系统库”复选框可以更轻松地在调用树视图中查找代码。 The checkboxes are on the left side of the trace document window. 复选框位于跟踪文档窗口的左侧。

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

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