title: EXC_BAD_ACCESS on setCollectionViewLayout
body: <p>If I change the layout of a <a href="http://developer.apple.com/library/ios/#Documentation/UIKit/Reference/UICollectionView_class/Reference/Reference.html#//apple_ref/occ/cl/UICollectionView" rel="nofollow noreferrer">UICollectionView</a> during an orientation change, I get <code>EXC_BAD_ACCESS</code> after a few rotations.</p>
  
  <pre><code>- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
      UICollectionViewLayout *layout = [[UICollectionViewFlowLayout alloc] init];
      self.myCollectionView.collectionViewLayout = layout; // This causes EXC_BAD_ACCESS after a few rotations
  }
  </code></pre>
  
  <p>Is this a <code>UICollectionView</code> bug? Or am I doing something wrong? If it's a bug, is there any way to change the whole layout during an orientation change?</p>
  
  <p>I noticed that the same problem is mentioned in this <a href="https://stackoverflow.com/a/12631040/143378">answer</a>. Debugging with NSZombies does not produce additional information.</p>