Instead of:
can we do the following?:
In the second one, [UIWindow alloc] increments reference count by 1;
'self.portraitWindow = ...' increments by 1, too. Finally, [self.portraitWindow release] decrements by 1.
Am I correct?
Code:
UIWindow *localPortraitWindow;
localPortraitWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.portraitWindow = localPortraitWindow;
can we do the following?:
Code:
self.portraitWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.portraitWindow release];
In the second one, [UIWindow alloc] increments reference count by 1;
'self.portraitWindow = ...' increments by 1, too. Finally, [self.portraitWindow release] decrements by 1.
Am I correct?