Currently Being ModeratedSep 14, 2012 10:11 AM (in response to MarionMck)
Under the Cocoa naming conventions objects returned by convenience methods like:
UIImage *btnimg = [UIImage imageNamed:imagefile];
are passed you autoreleased. You should not send a release to this object and the errors you're getting reflect this. If you add it to an array this will add to the retain count but you should not release it after adding it to the array - just add it.
The magic words in Cocoa are alloc, copy and new. If you use these words when you create it then you own it. If not assume something else owns it and will do the right thing. If you release something you don't own (or have explicitly retained) you're stepping on the process and you'll get errors like the ones you're getting.