소스 검색

[Issue #70] Removing subdelegate after didCompleteWithError delegate method, to allow for deallocation with Request

Mattt Thompson 11 년 전
부모
커밋
7121cc86a7
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Source/Alamofire.swift

+ 2 - 0
Source/Alamofire.swift

@@ -335,6 +335,8 @@ public class Manager {
         func URLSession(session: NSURLSession!, task: NSURLSessionTask!, didCompleteWithError error: NSError!) {
             if let delegate = self[task] {
                 delegate.URLSession(session, task: task, didCompleteWithError: error)
+
+                self[task] = nil
             }
         }