断点导致 iOS 应用程序在向僵尸对象发送消息时立即停止?

发布于 2024-10-03 15:34:12 字数 164 浏览 0 评论 0原文

我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

缺⑴份安定 2024-10-10 15:34:12

这篇博客文章说在 -[_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/

千纸鹤 2024-10-10 15:34:12

您是否尝试过在 -(void)dealloc 中放置断点?

Have you tried to put a breakpoint in -(void)dealloc?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文