-->

收到错误:指针被释放没有被分配在***向malloc_error_break调试设置断点(Getti

2019-08-17 08:59发布

我收到以下错误:

malloc: *** error for object 0xa68aca0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

我已经设置了Symbolic Breakpoint ,但没有出现在控制台中,没有获得在控制台的任何暗示。

我使用xcode 4.6

任何帮助表示赞赏。

Answer 1:

你可能会释​​放对象太多次。

通过按下为Cmd + Shift + R打开调试控制台。 然后在下面的

break malloc_error_break

这将在开头设置断点malloc_error_break ,你也可以尝试打印出有什么物体在0xa68aca0

print-object 0x1068310

其他办法做到这一点是使用NSZombieEnabled

另外值得一读这



文章来源: Getting the error :pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug