Xcode Instruments - Enable NSZombie Detection? Where is it?

匆匆过客 提交于 2019-11-27 07:04:55

问题


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


回答1:


In XCode 4.0, this 'Enable Zombie' option is only present in iPhone simulator and not when you profile on actual device.




回答2:


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 ;-)




回答3:


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.



来源:https://stackoverflow.com/questions/5215176/xcode-instruments-enable-nszombie-detection-where-is-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!