以下是我的代码:
Phone SDK未识别的cocoa对象活动周期:
- (void) DismissWelcomeMessage: (UIAlertView *) view
{
[view dismissWithClickedButtonIndex:0 animated:YES];
}
- (void) ShowWelcomeMessage
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Blah" message:@"Blah Blah" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[self performSelector:@selector (DismissWelcomeMessage:) withObject: alert afterDelay: WELCOME_MESSAGE_DELAY];
[alert release];
}
首先调用ShowWelcomeMessage。
是因为Disclease函数在调用函数时使用传递到堆栈上的对象的副本作为参数吗?但即使这样,它也只是指向现在解除分配的对象的指针的副本吗?
在C++中删除?