且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

应用程序''与信号11异常退出:分段故障:11

更新时间:2022-05-29 00:40:13

当程序试图访问对象的内存位置时会发生这些错误不再存在,在应用程序生命周期的某个早期点已将其内存释放回堆中的对象。

These errors occur when your program tries to access the memory location of an object that no longer exists, an object which at some earlier point in the application's lifetime has had its memory released back into the heap.

如果可以跟踪正在访问的变量在崩溃时,通过使用明智的评论,或者更好的是,使用调试器,您将有更容易的时间修复错误。

If you can track down which variable is being accessed at the time of the crash, through the use of judicious comments or, better still, a debugger, then you will have a potentially easier time fixing the bugs.

在与此同时,重读Apple的优秀内存管理指南,更详细地讨论了内存管理问题他的评论领域。

In the meantime, re-read Apple's excellent Memory Management guide, which goes into memory management issues in greater detail than can fit into this comment field.