title: NSArray of weak references (__unsafe_unretained) to objects under ARC
body: <p>I need to store weak references to objects in an NSArray, in order to prevent retain cycles. I'm not sure of the proper syntax to use. Is this the correct way?</p>
  
  <pre><code>Foo* foo1 = [[Foo alloc] init];
  Foo* foo2 = [[Foo alloc] init];
  
  __unsafe_unretained Foo* weakFoo1 = foo1;
  __unsafe_unretained Foo* weakFoo2 = foo2;
  
  NSArray* someArray = [NSArray arrayWithObjects:weakFoo1, weakFoo2, nil];
  </code></pre>
  
  <p><strong>Note that I need to support iOS 4.x</strong>, thus the <code>__unsafe_unretained</code> instead of <code>__weak</code>.</p>
  
  <hr>
  
  <p><strong>EDIT</strong> (2015-02-18):</p>
  
  <p>For those wanting to use true <code>__weak</code> pointers (not <code>__unsafe_unretained</code>), please check out this question instead: <a href="https://stackoverflow.com/q/14209070/245265">Collections of zeroing weak references under ARC</a></p>