Pointer being freed was not allocated. Problem with iOS 4 but not with iOS 5?
I was trying to develop an app on an iOS 5 beta iPhone and the code could be run with no errors but while I was trying to compile the same apps to and iOS 4.3.3 device, I encountered an error "pointer being freed was not allocated".
I searched the web开发者_如何学Go for solutions and apparently it was something link to releasing an object to soon but I crashed even before I released any object. Some other developers also encountered the same error when testing on iOS 4 but not in iOS 3.2.
Any thoughts on what's wrong with it? and also anything solutions to that?
Thanks:)
Lawrence
Xcode 4.2 includes a much better compiler that will help you find even more memory management errors than the old compiler would point out for you. This is because to implement ARC they needed to do deeper static code analysis. It is often the case the where your program crashes is different from where the original error occurred. I've listed some ideas for how to attack this kind of problem here: What to watch out for when transitioning to iOS 5.
精彩评论