How to find the cause of a malloc “double free” er

2019-01-05 08:06发布

I'm programming an application in Objective-C and I'm getting this error:

MyApp(2121,0xb0185000) malloc: *** error for object 0x1068310: double free
*** set a breakpoint in malloc_error_break to debug

It is happening when I release an NSAutoreleasePool and I can't figure out what object I'm releasing twice.

How do I set his breakpoint?

Is there a way to know what is this "object 0x1068310"?

13条回答
SAY GOODBYE
2楼-- · 2019-01-05 09:09

This is usually caused by some inspector, such as safari or safari preview. Refer to post or post and question.

Remove the select of AutoMatically Show Web ...., will remove this issue.

Note, just close safari or safari preview will not remove this issue. And you have to deselect both of safari and safari preview.

If this will not do, refer to this answer or post to debug it.

deselect automatically inspect on safari preview

查看更多
登录 后发表回答