title: Why is this NSString length zero when the debugger summary shows text?
body: <p>Strangeness with non-nil, non-empty NSStrings returning a zero length. Here is how I'm setting up my string.</p>
  
  <pre><code>// property is declared like so in .h
  @property (strong, nonatomic) NSString *myStringValue;
  
  // synthesized like so in .m
  @synthesize myStringValue;
  
  // most times property is set directly like so (.m)&lt;br /&gt;
  // ...
  self.myStringValue = @"Some Value";
  // ...
  
  // property is (sometimes) set like so (.m)&lt;br /&gt;
  // copied from another vc
  // ...
  self.myStringValue = anotherObj.myStringValue;
  // ...
  </code></pre>
  
  <p><strong>Zero Length</strong><br />
  When the property has been set by assigning it from another object (<em>the latter case</em>), and used later on at some point in the code, <code>[self.myStringValue length]</code> returns 0 even though mouseover using the debugger shows the summary text correctly as "Some Value".</p>
  
  <p><strong>NSString Optimization?</strong><br />
  <a href="http://www.cocoanetics.com/2012/03/beware-of-nsstring-optimizations/" rel="nofollow">This blog</a> talks about NSString optimizations that may happen when there are multiple NSString objects floating around in memory that contain the same string. I wonder if this could have anything to do with it. Since NSString is implemented as a class-cluster, and NSString objects may be transformed into any number of related private classes (*__NSCFString, __NSCFStringConstant*) behind the scenes for optimization purposes, perhaps this is what is causing my problem, if either of these classes happen to return zero for length messages...</p>
  
  <p>Thoughts?</p>