是否是ViewController上需要的版本

时间:2011-03-22 15:44:16

标签: iphone objective-c

加载ZZZViewController时如下所示

ZZZViewController *zzzvc = [[ZZZViewController alloc] initWithNibName:@"ZZZViewController" bundle:nil];
zzzvc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:zzzvc animated:YES];

我现在要做[zzzvc release];

由于

2 个答案:

答案 0 :(得分:5)

是的,你分配/初始化它。你有责任清理它。

答案 1 :(得分:0)

是的,因为:

alloc => +1
presentModalViewController => +1
dismiss => -1

总计:+1不是0. => BAD

release => -1

总计:0 =>行