views:

33

answers:

1

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.

+2  A: 

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;
No one in particular
You can safely release (not only autorelease) the alert after showing it. This is even the better solution, as the object gets deallocated immediately, because its retain count reaches 0 at this point. You get the memory back immediately.
muffix
@Bjorn: Good point.
No one in particular