views:

116

answers:

2

HI guy's,

Can anyone please solve my problem, I am getting exception as:

  malloc: *** error for object 0x754cab0: double free
 *** set a breakpoint in malloc_error_break to debug
 Program received signal:  “SIGABRT”.

I dont know why it was generated only in Iphone sdk 4.0(device and simulator), but it was not generated in Iphone sdk 3.0 versions(device and simulator).

Can anyone gimme a quick response for this solution so that I can update my app.

Thank's in advance.

Monish.

A: 

It tells you what the problem is: You are free'ing memory when it has already been done, probably by sending too many release messages to an object.

Run in debug mode and it will probably stop right away at the correct line of code. Then, trace back what you do that object.

Eiko
A: 

The allocations tool (Run > Run with Performance Tool > Object Allocations) should be pretty helpful here--it will show you all backtraces that allocated, retained, or released an object. Finding the place where you forgot to retain should be pretty easy given those backtraces.

orange