【问题标题】:How can you find the name/identifier of a released object that's getting messages sent to it?您如何找到正在向其发送消息的已发布对象的名称/标识符?
【发布时间】:2012-04-26 22:38:13
【问题描述】:

我在 Instruments 中做的事情是显示有关已发送消息的对象的信息,但与变量的实际名称相比,内存地址不太有用。有没有办法找出它的标识符是什么?

【问题讨论】:

    标签: ios xcode debugging instruments


    【解决方案1】:

    尝试添加符号断点,例如:

    [NSException raise]
    objc_exception_throw
    malloc_error_break
    

    还可以尝试启用 NSZombies,您应该能够看到调用释放实例上的释放的代码行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-07
      • 2011-03-17
      • 1970-01-01
      • 2016-10-20
      • 1970-01-01
      相关资源
      最近更新 更多