断点导致 iOS 应用程序在向僵尸对象发送消息时立即停止?
我的 iOS 应用程序存在内存管理错误。我已经设置了 NSZombieEnabled,并且“消息发送到已释放的对象”消息正式出现在控制台中。但在应用程序崩溃之前,执行似乎已经超过了该消息的点。至少,它正在走出一些方法。这使得追踪错误变得更加困难。
有没有办法让执行在消息发送到已释放对象时立即停止?
I have a memory management bug in my iOS app. I have set NSZombieEnabled, and the "message sent to deallocated object" message duly appears in the console. But execution appears to go past the point of that message before the app crashes. At a minimum, it is stepping out of some methods. This makes it harder to track down the bug.
Is there a way I can get execution to stop right when the message is sent to the deallocated object?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这篇博客文章说在
-[_NSZombie methodSignatureForMethod:]
上设置断点可以解决问题:http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/This blog post says setting a breakpoint on
-[_NSZombie methodSignatureForMethod:]
will do the trick: http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/您是否尝试过在 -(void)dealloc 中放置断点?
Have you tried to put a breakpoint in -(void)dealloc?