Reputation: 24325
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];
}
Upvotes: 0
Views: 75
Reputation: 16946
If ARC wasn't enabled, then yes, release should have been called after show
.
Upvotes: 4