From 044a130294c54611c5fe8b7e26101032b4ff7340 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Wed, 18 Oct 2017 14:17:20 +0300 Subject: [PATCH] Fix memory leak --- CBPinEntryView/Classes/CBPinEntryView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CBPinEntryView/Classes/CBPinEntryView.swift b/CBPinEntryView/Classes/CBPinEntryView.swift index f32cdfd..5911fd3 100644 --- a/CBPinEntryView/Classes/CBPinEntryView.swift +++ b/CBPinEntryView/Classes/CBPinEntryView.swift @@ -8,7 +8,7 @@ import UIKit -public protocol CBPinEntryViewDelegate { +public protocol CBPinEntryViewDelegate: class { func entryChanged(_ completed: Bool) } @@ -81,7 +81,7 @@ public protocol CBPinEntryViewDelegate { fileprivate var entryButtons: [UIButton] = [UIButton]() - public var delegate: CBPinEntryViewDelegate? + public weak var delegate: CBPinEntryViewDelegate? override public init(frame: CGRect) { super.init(frame: frame)