获取错误:未释放指针被释放***在malloc_error_break中设置断点以进行调试

时间:2013-03-06 17:24:33

标签: ios6 breakpoints xcode4.6

我收到以下错误:

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

感谢任何帮助。

1 个答案:

答案 0 :(得分:8)

您可能会多次释放该对象。

按Cmd + Shift + R打开调试器控制台。然后输入以下内容

break malloc_error_break

这将在开头malloc_error_break设置一个断点,你也可以尝试打印0xa68aca0上的对象是什么

print-object 0x1068310

其他方法是使用NSZombieEnabled

Also worth reading this