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

后端 未结 13 968
情深已故
情深已故 2020-11-27 09:51

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

MyApp(2121,0xb0185000) malloc: *** error for object 0x1068310: double

13条回答
  •  悲哀的现实
    2020-11-27 10:47

    In Xcode, click left of the line number to set a breakpoint. Then you can launch it by doing a "Build and Debug".

    It is recommended to not have object that you create be autorelease since memory is a commodity on the iPhone. Apple recommends explicitly calling release.

提交回复
热议问题