tags:

views:

47

answers:

1

this is on the main code:

NSString * title = NSLocalizedString(@"myTitle", @"");
NSString * cancelTitle = NSLocalizedString(@"dismiss", @"");
NSString * otherTitle = NSLocalizedString(@"noMoreTips", @"");
NSString * message = NSLocalizedString(@"myMessage", @"");

[self ShowAlertBox: title : message : cancelTitle : otherTitle];

This is the method

- (void) ShowAlertBox: (NSString *) title : (NSString *) myMessage : (NSString *) cancelButton : (NSString *) otherButton {


UIAlertView * alertView = [[UIAlertView alloc]
               initWithTitle:title
               message:myMessage 
               delegate:self cancelButtonTitle:cancelButton
            otherButtonTitles:otherButton, nil ];

[alertView show];
[alertView release];
}

I have also tried to remove the [alertView release] from here and put it inside

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

without any success... it is still leaking!!

am I missing something?

thanks

+1  A: 

There's no leak. It's likely a false positive.

KennyTM
WHAT ????!!!!!!!!!???!?!?!?!!?!?!?!?!can this happen? I will throw instruments out of the window! So, is instruments not trustable?
Digital Robot
@Digital: Always verify if the leak is reasonable. You need to check "Build and Analyze" is more useful. Of course, if you fully understand the memory management guide it's easy to see if there's leak of not.
KennyTM