title: Saving [NSTextField stringValue]... variable is cleared when my window closes?
body: <p>So I grab the username from the field, save it in an NSString variable: </p>
  
  <pre><code>    loggedInUser = [usernameField stringValue];
      [loginWindow close];
  </code></pre>
  
  <p>Later, I try to access that <code>loggedInUser</code> data:</p>
  
  <pre><code>    NSLog(@"Logged in User:%@", loggedInUser);
  </code></pre>
  
  <p>This often, but not always, gives an error:</p>
  
  <pre><code>    Program received signal: "EXC_BAD_ACCESS". // Summary displays "{...}" for the value
  </code></pre>
  
  <p>The <code>loggedInUser</code> NSString gets cleared? What happened? (I never modify this value myself).</p>
  
  <p>My only thought is that I am somehow saving the <em>continued</em> value of the NSTextField in the NSString. Then, when I close the window, that value is cleared. </p>
  
  <p>Is that what's happening? How do I save that Textfield value in a safe way for continued use?</p>