title: Why is window autoreleased in appliciation:didFinishLaunchingWithOptions: and released in dealloc?
body: <p>I have created an iphone application using the empty template without ARC in xcode 4.2. I'm not currently using ARC because I want to learn the basics of reference counting. In the application delegate I have the following method:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
      // Override point for customization after application launch.
      self.window.backgroundColor = [UIColor whiteColor];
      [self.window makeKeyAndVisible];
      return YES;
   }
  </code></pre>
  
  <p>Why is <code>window</code> autoreleased? Is it because AppDelegate won't be using it in the future? But it is being assigned to a instance variable. There is also a dealloc method where <code>window</code> is released. Why is it released when it is already autoreleased?</p>
  
  <pre><code>- (void)dealloc
  {
      [_window release];
      [super dealloc];
  }
  </code></pre>