Xcode Instruments - Enable NSZombie Detection? Where is it?

前端 未结 3 1612
半阙折子戏
半阙折子戏 2020-12-11 07:59

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 instrumen

相关标签:
3条回答
  • 2020-12-11 08:33

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

    0 讨论(0)
  • 2020-12-11 08:33

    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.

    0 讨论(0)
  • 2020-12-11 08:47

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

    enter image description here

    0 讨论(0)
提交回复
热议问题