有时我得到一个EXC_BAD_ACCESS
错误在此代码:对于循环的结果有时EXC_BAD_ACCESS
internal func downloadMultiple(files: NSMutableArray, remoteBaseUrl: NSURL, completion: (result: Int)->()) -> Void {
self.filesToDownload = files
self.cb = completion
for item in files { // this line gets marked, but why this line?
print("file ", item["file"] as! String)
self.download(remoteBaseUrl.URLByAppendingPathComponent(item["file"] as! String)!)
}
}
但它只是有时会发生,任何想法如何找出是什么原因造成的?
'项目[“文件”]结合'是零? – shallowThought