From 8b2a8eab7aa741755d31ad9ec293c638e9ee5dbb Mon Sep 17 00:00:00 2001 From: Gareth Date: Wed, 4 Jul 2018 11:10:38 +0100 Subject: [PATCH] Made delegate var weak to avoid memory leaks --- sample-swift/SendBird-iOS/Chatting/ChattingView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-swift/SendBird-iOS/Chatting/ChattingView.swift b/sample-swift/SendBird-iOS/Chatting/ChattingView.swift index b0cbcb0..64a3bd8 100644 --- a/sample-swift/SendBird-iOS/Chatting/ChattingView.swift +++ b/sample-swift/SendBird-iOS/Chatting/ChattingView.swift @@ -37,7 +37,7 @@ class ChattingView: ReusableViewFromXib, UITableViewDelegate, UITableViewDataSou var stopMeasuringVelocity: Bool = true var initialLoading: Bool = true - var delegate: (ChattingViewDelegate & MessageDelegate)? + weak var delegate: (ChattingViewDelegate & MessageDelegate)? @IBOutlet weak var typingIndicatorContainerViewHeight: NSLayoutConstraint! @IBOutlet weak var typingIndicatorImageView: UIImageView!