我收到以下错误:
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
感谢任何帮助。
答案 0 :(得分:8)
您可能会多次释放该对象。
按Cmd + Shift + R打开调试器控制台。然后输入以下内容
break malloc_error_break
这将在开头malloc_error_break
设置一个断点,你也可以尝试打印0xa68aca0上的对象是什么
print-object 0x1068310
其他方法是使用NSZombieEnabled