title: C array of Objective C objects
body: <p>I'm trying to create a C array of objective C NSStrings using malloc.  I'm not doing it right, but I don't think I'm far off.  Maybe someone can point me in the right direction.
  Let's say we want 5 strings in our array for the sake of argument.</p>
  
  <p>Interface:</p>
  
  <pre><code>@interface someObject : NSObject {
      NSString **ourArray;
  }
  @property () NSString **ourArray;
  @end
  </code></pre>
  
  <p>Implementation:</p>
  
  <pre><code>@implementation someObject
  @synthesize ourArray;
  
  -(id)init {
      if((self = [super init])) {
          self-&gt;ourArray = malloc(5 * sizeof(NSString *));
      }
      return self;
  }
  
  -(NSString *)getStringAtPos3 {
      if(self.ourArray[3] == nil) {
          self.ourArray[3] = @"a string";
      }
      return self.ourArray[3];
  }
  @end
  </code></pre>
  
  <p>When I set a breakpoint in getStringAtPos3 it doesn't see the array element as nil so it never goes into the if statement.</p>