Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iphone-如何使用此alertView获得泄漏?_Iphone_Ipad - Fatal编程技术网

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:始终验证泄漏是否合理。您需要检查“构建和分析”是否更有用。当然,如果您完全理解《内存管理指南》,就很容易看出是否存在内存泄漏。