当 iPad 应用程序离开启动屏幕时,Xcode Instruments 停止记录
我正在编写一个 iPad 应用程序,我想使用 Xcode Instruments 来查看我的应用程序是否存在任何内存泄漏。我之前曾成功使用过 Instruments,但最近使用 Xcode 4.0.2 时,我遇到了标题中描述的问题。它很少起作用。
仪器使用步骤: - 从 Xcode 菜单:产品>配置文件 - 选择Leaks仪器 - 当应用程序显示启动屏幕时,观察 Instruments 开始记录分配和泄漏。 - 应用程序的初始视图控制器变得可见,并且 Instruments 同时停止录制。
我做错了什么吗?这是 Instruments 中的错误吗?
任何帮助将不胜感激。
编辑:
乐器可以在 iPad 模拟器上运行,但不能在设备 (iPad 2) 上运行
I am writing an iPad app and I would like to use Xcode Instruments to see if my app has any memory leaks. I have used Instruments successfully before but with Xcode 4.0.2 recently with this app I have the problem described in the title. It only works very rarely.
Steps to use Instruments:
- From the Xcode menu: Product>Profile
- Choose the Leaks instument
- Watch Instruments start recording allocations and leaks while the app shows its splash screen.
- The app's initial view controller becomes visible and Instruments stops recording at the same time.
Am I doing something wrong? Is this a bug in Instruments?
Any help would be appreciated.
Edit:
Instruments works on the iPad simulator but not the device (iPad 2)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过将配置文件构建从发布更改为调试(进入“编辑方案”,您可以在那里更改它以进行分析)?
可能是发布版本中的某些问题导致 Instruments 断开连接。
另外,在管理器运行时拉出管理器中的设备控制台,看看是否看到任何与分离相关的消息。
Have you tried changing the profile build from Release to Debug (go into "Edit Schemes" and you can change it there for Profiling)?
It could be something in the release build is causing Instruments to disconnect.
Also, pull up the device console in Organizer while it is running, and see if you see any messages related to the detachment.
确保您的设备已打开(在某些情况下,它可能会自发关闭)。
Be sure, you device is turned on (in some cases it can be spontaneously shut down).