在XCode,4以上版本中,设置NSZombieEnabled和MallocStackLogging

1.点击XCode的Product菜单,选择Edit Scheme...选项

2.选择左侧的Run...,右边点击Arguments

3.在Environment Variables栏里,添加NSZombieEnabled,value为YES;再添加MallocStackLogging,value为YES;

如下图所示:

设置NSZombieEnabled和MallocStackLogging

以上选项只能在模拟器上有效,如果你改变了iOS的版本,需要重新设定。 

调试结束后,最好记得把环境变量NSZombieEnabled,MallocStackLogging前面的勾去掉,因为它们会使得内存不会被释放.

相关文章:

  • 2021-08-08
  • 2021-09-09
  • 2022-12-23
  • 2022-02-13
  • 2021-10-21
  • 2022-01-06
  • 2021-07-03
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2021-10-13
  • 2021-09-15
相关资源
相似解决方案