From cd69c883fdac4d6112805f95b4a3ad70accad570 Mon Sep 17 00:00:00 2001 From: Daniele Margutti Date: Wed, 7 Dec 2022 17:26:28 +0100 Subject: [PATCH] #75: added weak to HTTPClient's delegate property to avoid memory leak --- Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift b/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift index b509bf5..0d22e8b 100644 --- a/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift +++ b/Sources/RealHTTP/Client/HTTPClient/HTTPClient.swift @@ -28,7 +28,7 @@ public class HTTPClient { public static let shared = HTTPClient(baseURL: nil) /// Delegate of the client. - public var delegate: HTTPClientDelegate? + public weak var delegate: HTTPClientDelegate? /// Base URL used to compose each request. ///