Xcode Instruments - 启用 NSZombie 检测吗?它在哪里?
我看过这个视频 http://www.markj.net/iphone-memory-debug-nszombie/
这家伙显示了一个名为“在仪器内的分配上启用 NSZombie 检测”的选项,但我的仪器没有显示此选项。这家伙的视频是使用一年前版本的 Instruments 完成的,而我使用的是 Xcode 3.2.5。大家知道这个选项现在在哪里吗?如何为 iPhone 应用程序启用它?
谢谢
I have watched this video
http://www.markj.net/iphone-memory-debug-nszombie/
The guy shows an option called Enable NSZombie Detection on Allocations inside instruments, but my Instruments doesn't shows this option. This guy's video was done using a one year old version of Instruments and I am using Xcode 3.2.5. Do you guys know where this option is now? How can I enable it for iPhone apps?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 XCode 4.0 中,此“启用 Zombie”选项仅出现在 iPhone 模拟器中,而不是在实际设备上进行配置时出现。
In XCode 4.0, this 'Enable Zombie' option is only present in iPhone simulator and not when you profile on actual device.
如果您在模拟器中运行,则 Xcode 3.2.6 中的分配工具下提供了僵尸选项。为了调试由于过多的释放而导致的内存崩溃,模拟器几乎每次都会像设备一样工作。顺便说一句,我是问题中的“那个人”;-)
The zombie option is available in Xcode 3.2.6 under the allocations tool if you run in the simulator. For debugging memory crashes due to too many dealloc, the simulator will work just as well as the device nearly every time. BTW I am 'The guy' in the question ;-)
您可以在分配工具的工具中找到它。最简单的方法是选择:
运行 ->使用性能工具运行 ->分配
这将启动应用程序,仪器将开始记录。但是,僵尸检测可能会关闭。要打开它,请停止录制,单击“i”图标,然后选中“启用 NSZombie 检测”。启用后,再次开始录制。
需要注意的是,在 XCode 4.0 中,只能在模拟器中启用僵尸检测,而不能在设备上运行时启用僵尸检测。
You can find it in Instruments in the Allocations Instrument. The easiest thing to do is to select:
Run -> Run with Performance Tool -> Allocations
This will start the application and Instruments will start recording. However, the Zombie detection may be off. To turn it on, stop the recording, click on the 'i' icon, and check 'Enable NSZombie detection'. Once it is enabled, start the recording again.
It should be noted that in XCode 4.0, one can only enable zombie detect in the simulator, not when running on a device.