title: iOS NSCoding NSMutableArray
body: <p>I have <code>.h</code> and <code>.m</code> to implement <code>NSCoding</code>, but the <code>mutableArray</code> object count always be 0...</p>
  
  <p><strong>.h</strong></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface Favorite : NSObject &lt;NSCoding&gt; {
      NSMutableArray *myArray;
  }
  @property (nonatomic, retain) NSMutableArray *myArray;
  @end
  </code></pre>
  
  <p><strong>.m</strong></p>
  
  <pre><code>#import "Favorite.h"
  
  @implementation Favorite
  - (void)dealloc {
      [myArray release];
  }
  
  - (void)encodeWithCoder:(NSCoder *)encoder {
      [encoder encodeObject:myArray];
  }
  
  - (id)initWithCoder:(NSCoder *)decoder {
      myArray = [[decoder decodeObject] retain];
      return self;
  }
  @end
  </code></pre>
  
  <p>I'll use this class like </p>
  
  <pre><code>Favorite *fav = [[Favorite alloc] init];
  fav.myArray = self.anotherArray;
  [fav release];
  </code></pre>
  
  <p>Is it correct??</p>