title: Error passing Swift array of closures to an Objective-C method
body: <p>Define an Objective-C method:</p>
  
  <pre><code>@implementation OCObject
  
  + (void)passArr: (NSArray *)arr {
      void (^aBlock)(NSString *) = arr[0];
      aBlock(@"Crash Here");
  }
  
  @end
  </code></pre>
  
  <p>Pass an array contains aBlock in Swift to Objective-C methodA:</p>
  
  <pre><code>class SwiftObject {
      class func test() {
          let aBlock: ((String) -&gt; ()) = { str in
              print(str)
          }
  
          OCObject.passArr([aBlock])
      }
  }
  </code></pre>
  
  <p>Then Call <code>SwiftObject.test()</code>.</p>
  
  <p>Crash at the line of <code>aBlock(@"Crash Here")</code>, and throw <code>Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)</code></p>
  
  <p>However, when I do this all in OC, it's OK.</p>
  
  <p>Why? Is this related to the escaping closure?</p>