如何解释“Leaks”的输出 XCode 性能工具?
我不明白 XCode 中“Leaks”性能工具的输出。 我该如何解释这个输出?
I don't understand the output from the "Leaks" performance tool in XCode. How can I interpret this output?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Leaks Instrument 会查找应用程序代码中未引用的内存块。
表视图显示了在这种情况下找到的块的地址。
是的,Instruments 使用起来并不简单,显然有许多来自操作系统和/或系统库的泄漏,细节通常显示过度释放的块(?!)。
生活很复杂:)
The Leaks Instrument looks for blocks of memory that are not referenced from the application code.
The Table View shows the addresses of the block found in such condition.
Yes, Instruments it's not simple to use, there are many leaks apparently from the OS and/or the system libraries, the details often show over-freed blocks (?!).
Life is complex :)
泄漏的作用不大。 您将遇到的一个更大的问题是您认为已发布但仍然保留的参考文献。 为此,请使用对象分配工具并选中“已创建且仍然存在”。
如果您发现内存使用量随着时间的推移而增加,请突出显示一个区域并查看您自己的代码中分配了哪些您不期望的对象。
Leaks is only marginally useful. A much bigger problem you will have is references which are still retained that you think have been released. For that, use the Object Allocation tool with "created and still living" checked.
If you see memory use increase over time, highlight a region and see what objects are allocated in your own code that you were not expecting.
斯坦福大学 CS 193P(Cocoa/iPhone 应用程序编程)第 10 讲的精彩视频介绍了 Leaks。
http://www.stanford.edu/class/cs193p/cgi- bin/index.php
Leaks is covered in a wonderful video of Lecture 10 of Stanford's CS 193P (Cocoa/iPhone Application Programming).
http://www.stanford.edu/class/cs193p/cgi-bin/index.php