我对ARC的了解有限,所以我想更多地了解它。以这个简单的示例代码为例:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIViewController *rootViewController = [[UIViewController alloc] init];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[[self window] setRootViewController:rootViewController];
[[self window] setBackgroundColor:[UIColor whiteColor]];
[[self window] makeKeyAndVisible];
return YES;
}
我的问题是:在整个方法范围内rootViewController会发生什么?我的直觉是: