- [CALayer retain]:发送到解除分配实例的消息

Rom*_*iel 4 iphone calayer nszombie nsautoreleasepool

我正在开发一个iPhone应用程序,当我打开我的NSZombieEnabled时,我经常遇到错误:

*** -[CALayer retain]: message sent to deallocated instance 0xe6012e0
Run Code Online (Sandbox Code Playgroud)

当我在视图控制器中推送或弹出视图时,它总会出现.有时候之前有这个错误:

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
Run Code Online (Sandbox Code Playgroud)

这是什么意思?任何人都有线索或遇到过这个问题?

非常感谢您的帮助!

罗曼

Ton*_*ony 14

这可能意味着您正在尝试将对象保留为已释放的UI对象,例如UIButton.有很多方法可以追踪这个问题但是如果你可以缩小应用程序中发生这种情况的范围,我通常会开始评论版本,直到我看到问题发布的位置.我的猜测是你发布了一些自动释放的东西.