title: How to print the retain count of an object?
body: <p>I am trying to print out the retain count of an object in the terminal using NSLog. Here is my  code:</p>
  
  <pre><code>NSNumber *myInt=[[NSNumber alloc] initWithInteger: 100];
  NSLog(@"myInt retain count=%d",[myInt retainCount]);
  </code></pre>
  
  <p>The result should be 1 but what I have got at the terminal is -1. I tried to use %u instead of  %d and ended up getting 4294967295 as result. Does anyone know why this happens?</p>