title: Are NSStrings stored on the heap or on the stack and what is a good way to initialize one
body: <p>I have 2 new questions: </p>
  
  <p>1) Consider this line: </p>
  
  <pre><code>NSString *myString = [[NSString alloc] initWithString: @"Value"]; 
  </code></pre>
  
  <p>There were two things I learned, but I would like confirmation: 
  As I learned, the "alloc" message indicates that the instance of NSString will be stored in the "heap" memory. 
  I understood also that primitive variables such as "chars" are stored in the "stack" memory. </p>
  
  <p>Does this mean that: </p>
  
  <ul>
  <li>the instance of NSString is stored in the heap memory; </li>
  <li>AND that this object has an iVar pointer (when the initWithString method was called) to the "Value" string of primitive "chars", which reside in the stack memory? 
  How does this work in actuality? </li>
  </ul>
  
  <p>The second question is directly related and causes for me a personal dilemma (probably because I'm missing a point): 
  2) Which of the two approaches would you consult and why?: </p>
  
  <pre><code>NSString *myString = [[NSString alloc] initWithString: @"Value"]; 
  NSString *myString = @"Value"; 
  </code></pre>
  
  <p>If my first question is confirmed, both approaches should "in the end" point to chars that are stored in the stack memory. I therefore don't actually see the purpose of using the first option and being bothered with the retain count.</p>