iPhone development: pointer being freed was not allocated

I’ve had the same problem, with a lot of the same symptoms:

  • pointer being freed was not allocated error
  • upgraded to Xcode 3.2
  • error happening in code for images

If I change the build target to 3.1, the errors in the simulator go away. If I run the code on the device, the errors don’t appear. Possibly a bug in 3.0

My advice is to test with 3.1 as your target, and if you want, you can build for 3.0 for release and not worry about the errors as they don’t happen on the device.

Leave a Comment