title: What's the deal with [[UIApplication sharedApplication] delegate]?
body: <p>I am using [[UIApplication sharedApplication] delegate] to share a variable across several classes. I set the value in the AppDelegate. I am able to NSLog it from the myAppDelegate.m and see the value. Then I try to NSLog the value when one of my Tabs loads, and it crashes:</p>
  
  <pre><code>myAppDelegate *app = (myAppDelegate *)[[UIApplication sharedApplication] delegate];
  NSLog(@"Value:%@ ", app.delegateVar); // &lt;--- Causes Crash
  </code></pre>
  
  <p>Basically seems like it is creating a new instance of app.delegateVar ?</p>
  
  <p>delegateVar is defined in myAppDelegate.h and then it myAppDelegate.m I do this:</p>
  
  <pre><code>  - (void)applicationDidFinishLaunching:(UIApplication *)application {
  
          ...
  
          [delegateVar release];
          delegateVar = [NSString stringWithFormat:@"Test Value"];
          NSLog(@"%@",delegateVar);
  
      ...
      }
  </code></pre>