有時我得到一個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