Swift: UnsafeMutablePointer.deinitialize fatal error with negative count when appending to array : <p>The code below generates this error (appending to <code>exporters</code>):</p>

<blockquote>
  <p>fatal error: UnsafeMutablePointer.deinitialize with negative count</p>
</blockquote>

<pre><code>    var exporters = [AVAssetExportSession]()

    let exporter = AVAssetExportSession(asset: mainComposition, presetName: AVAssetExportPresetHighestQuality)!
    exporter.videoComposition = videoComposition
    exporter.outputFileType = AVFileTypeMPEG4
    exporter.outputURL = exportURL
    exporter.shouldOptimizeForNetworkUse = true
    exporters.append(exporter)
</code></pre>

<p>The other posts on StackOverflow regarding <code>UnsafeMutablePointer.deinitialize</code> do not shed much light on the issue, which doesn't happen consistently.</p>

<p>Any ideas?</p>
