iphone-如何使用此alertView获得泄漏?
这在主代码上:iphone-如何使用此alertView获得泄漏?,iphone,ipad,Iphone,Ipad,这在主代码上: NSString * title = NSLocalizedString(@"myTitle", @""); NSString * cancelTitle = NSLocalizedString(@"dismiss", @""); NSString * otherTitle = NSLocalizedString(@"noMoreTips", @""); NSString * message = NSLocalizedString(@"myMessage", @""); [se
NSString * title = NSLocalizedString(@"myTitle", @"");
NSString * cancelTitle = NSLocalizedString(@"dismiss", @"");
NSString * otherTitle = NSLocalizedString(@"noMoreTips", @"");
NSString * message = NSLocalizedString(@"myMessage", @"");
[self ShowAlertBox: title : message : cancelTitle : otherTitle];
这就是方法
- (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];
}
我还尝试从这里删除[alertView release],并将其放入其中
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
没有任何成功。。。它还在漏水
我错过什么了吗
谢谢,没有漏水。很可能是假阳性。什么????!!!!!!!!!???!?!?!?!!?!?!?!?!这会发生吗?我要把乐器扔出窗外!那么,仪器是否不可靠?@Digital:始终验证泄漏是否合理。您需要检查“构建和分析”是否更有用。当然,如果您完全理解《内存管理指南》,就很容易看出是否存在内存泄漏。