获取错误:未释放指针被释放***在malloc_error_break中设置断点以进行调试 [英] Getting the error :pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug
问题描述
我收到以下错误:
malloc: *** error for object 0xa68aca0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
我已经设置了 Symbolic Breakpoint
,但在控制台中没有任何事情发生,在控制台中没有任何提示。
I already set the Symbolic Breakpoint
, But Nothing happen in console, Not getting any hint in console.
我正在使用 xcode 4.6
感谢任何帮助。
推荐答案
您可能会释放该对象太多次。
You might be releasing the object too many times.
按Cmd + Shift + R打开调试器控制台。然后输入以下内容
Open up the debugger console by pressing Cmd+Shift+R. and then type in the following
break malloc_error_break
这将在开头设置一个断点 malloc_error_break
,你也可以尝试打印0xa68aca0的对象是什么
This will set a breakpoint at the beginning malloc_error_break
, you can also try printing out what's the object at 0xa68aca0
print-object 0x1068310
其他方法是使用< a href =http://www.raywenderlich.com/2696/how-to-debug-memory-leaks-with-xcode-and-instruments-tutorial =nofollow noreferrer> NSZombieEnabled
这篇关于获取错误:未释放指针被释放***在malloc_error_break中设置断点以进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!