你如何检测 iPhone 上的内存泄漏? [英] How do you detect memory leaks on iPhone?

查看:35
本文介绍了你如何检测 iPhone 上的内存泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过 Xcode 使用 Leaks Instruments 功能来(尝试和)查找内存泄漏.我还没有弄清楚如何使用这个程序.我在程序中单击 Leaks 并看到内存在我在模拟器中执行各种操作时增加.我显示了扩展详细信息窗格.Extended Detail 窗格中唯一引用我的应用程序的是 main.就像在 Xcode 生成的 main 方法中一样.其他一切都是 UIKit、Foundations 和其他我没有编写的 SDK 类.我的应用程序没有显示任何内容,我做错了什么?

I'm using the Leaks Instruments feature through Xcode to (try and) find memory leaks. I still haven't figured out how to use this program. I click Leaks in the program and see memory increasing as I do various things in the simulator. I have Extended Detail pane displayed. The only thing in Extended Detail pane that references my app is main. As in the main method produced by Xcode. Everything else is UIKit, Foundations, and other SDK classes I didn't write. What am I doing wrong that nothing is showing up from my app?

在我打 3 分钟之前,有超过 100 次泄漏,总计 2.5k.这很常见吗?

Before I hit 3 minutes, there are over 100 leaks totaling 2.5k. Is this common?

推荐答案

我写了一篇关于使用 Instruments 跟踪 iPhone 内存泄漏的教程.我不确定它是否会帮助你解决你正在处理的问题......不过不会受到伤害.:-)

I've written up a Tutorial on using Instruments to track iPhone memory leaks. I'm not sure if it will help you with what you're dealing with or not...couldn't hurt, though. :-)

http://www.streamingcolour.com/blog/tutorials/tracking-iphone-memory-leaks/

这篇关于你如何检测 iPhone 上的内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆