FREED(id): message release sent to freed object error solution?
In my Iphone app I am getting:
objc[597]: FREED(id): message release sent to freed object=0x3b81780
error.What should cause this error?IS it about memory allocation? I have UITable and model view that include some text field.It takes username f开发者_JS百科rom model view and search this in internet and gets some images from internet.It takes data but when model view disappears app exits.and gives that error.When model views close it runs my method and gets value.But it exits from app.
Basically you're trying to do something like this:
AnObject * anObject = [[AnObject alloc] init];
[anObject doSomething];
[anObject release];
[anObject doSomethingElse];
When the -release
is invoked, the object is deallocated (since it only had a +1 retain count), which means your message of doSomethingElse
is being sent to an object that no longer exists. You can run your app with the "Zombies" tool in Instruments to help debug this further.
精彩评论