Jules
Jules

Reputation: 7766

iphone, How can I get rid of this potential leak, caused by using return after UIAlertview?

Heres my analyzer leak...

alt text

I need to return and stop execution of the rest of my method, as I'm stopping the user as hes enter some text fields incorrectly.

Upvotes: 0

Views: 357

Answers (1)

No one in particular
No one in particular

Reputation: 2672

By line 442 I'm guessing that that is the alert value that you set after the WarningMessage. Notice that you've not released it. After the show try:

[alert show];
[alert autorelease];
return;

Upvotes: 2

Related Questions