本文介绍了当iPad应用程序离开启动画面时,Xcode Instruments会停止录制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个iPad应用程序,我想使用Xcode Instruments来查看我的应用程序是否有任何内存泄漏。我以前成功使用过Instruments但最近使用Xcode 4.0.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.

使用仪器的步骤:
- 从Xcode菜单:产品>配置文件
- 选择Leaks instument
- 当应用程序显示其闪屏时,Watch Instruments开始记录分配和泄漏。
- 应用程序的初始视图控制器变得可见,并且Instruments会同时停止录制。

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.

编辑:

乐器适用于iPad模拟器但不适用于设备(​​iPad 2)

Instruments works on the iPad simulator but not the device (iPad 2)

推荐答案

您是否尝试将配置文件构建从Release更改为Debug(进入Edit Schemes并在那里进行更改以进行性能分析)?

Have you tried changing the profile build from Release to Debug (go into "Edit Schemes" and you can change it there for Profiling)?

It可能是发布版本中的某些内容导致Instruments断开连接。

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.

这篇关于当iPad应用程序离开启动画面时,Xcode Instruments会停止录制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 10:25