Skip to content

Commit d9f0c21

Browse files
committed
Fix retain cycle
1 parent a5ec695 commit d9f0c21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BuckoNetworking/Bucko.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import Alamofire
1111
import SwiftyJSON
1212

13-
public protocol BuckoErrorHandler {
13+
public protocol BuckoErrorHandler: class {
1414
func buckoRequest(request: URLRequest, error: Error)
1515
}
1616

@@ -49,7 +49,7 @@ public struct Bucko {
4949
*/
5050
public var manager: SessionManager = SessionManager()
5151
public static let shared = Bucko()
52-
public var delegate: BuckoErrorHandler?
52+
public weak var delegate: BuckoErrorHandler?
5353

5454
/**
5555
Make API requests

0 commit comments

Comments
 (0)