title: Understanding Memory Management retain count
body: <p>I have an instant variable "obj1" in MyClass.h.</p>
  
  <pre><code>@property (nonatomic, retain) NSMutableArray *arrObj1;
  </code></pre>
  
  <p>and in MyClass.m <strong>viewDidLoad</strong> method, i have allocated another object "obj2" and assign that to obj1.</p>
  
  <pre><code> - (void)viewDidLoad {
      [super viewDidLoad];
      NSMutableArray *arrObj2 = [[NSMutableArray alloc] initWithObjects:@"a",@"b",@"c", nil];
      NSLog(@"arrObj2 count %lu",(unsigned long)[arrObj2 retainCount]);
      self.arrObj1 = arrObj2;
  
      NSLog(@"arrObj1 count %lu",(unsigned long)[self.arrObj1 retainCount]);
      NSLog(@"arrObj2 count %lu",(unsigned long)[arrObj2 retainCount]);
  }
  </code></pre>
  
  <p>Here is the output</p>
  
  <pre><code>2015-08-19 11:06:14.461 MyClass[1812:24133] arrObj2 count 1
  2015-08-19 11:06:16.332 MyClass[1812:24133] arrObj1 count 2
  2015-08-19 11:06:17.327 MyClass[1812:24133] arrObj2 count 2
  </code></pre>
  
  <p>I am not getting how arrObj2 get retain Count value 2.
  please explain me.</p>
  
  <p>Thank you</p>