I am reviewing some source code and noticed this method below. It isn’t releasing the message after allocating it. Shouldn’t there be a [message release]; after the show?
- (void)service:(TestService*)service didFailWithError:(NSObject *)error
{
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Service Error"
message:errorMsg
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
}
If ARC wasn’t enabled, then yes, release should have been called after
show.