Skip to content

Commit

Permalink
Merge pull request #2 from Anetsolutions/fix/weak_delegate
Browse files Browse the repository at this point in the history
Fix memory leak
  • Loading branch information
Fawxy authored Jan 30, 2018
2 parents c525de1 + 044a130 commit c6486d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CBPinEntryView/Classes/CBPinEntryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

public protocol CBPinEntryViewDelegate {
public protocol CBPinEntryViewDelegate: class {
func entryChanged(_ completed: Bool)
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c6486d1

Please sign in to comment.