Skip to content

Commit 22ff2a5

Browse files
authored
Merge pull request #100 from AlbaFontaneda/master
Hotfix memory leak
2 parents b10ab2d + 51e314d commit 22ff2a5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

iOSDropDown/Classes/iOSDropDown.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ open class DropDown : UITextField{
2222
@IBInspectable public var rowBackgroundColor: UIColor = .white
2323
@IBInspectable public var selectedRowColor: UIColor = .cyan
2424
@IBInspectable public var hideOptionsWhenSelect = true
25-
@IBInspectable public var isSearchEnable: Bool = true {
25+
@IBInspectable public var isSearchEnable: Bool = true {
2626
didSet{
2727
addGesture()
2828
}
@@ -52,11 +52,11 @@ open class DropDown : UITextField{
5252
}
5353

5454
//Variables
55-
fileprivate var tableheightX: CGFloat = 100
56-
fileprivate var dataArray = [String]()
57-
fileprivate var imageArray = [String]()
58-
fileprivate var parentController:UIViewController?
59-
fileprivate var pointToParent = CGPoint(x: 0, y: 0)
55+
fileprivate var tableheightX: CGFloat = 100
56+
fileprivate var dataArray = [String]()
57+
fileprivate var imageArray = [String]()
58+
fileprivate weak var parentController:UIViewController?
59+
fileprivate var pointToParent = CGPoint(x: 0, y: 0)
6060
fileprivate var backgroundView = UIView()
6161
fileprivate var keyboardHeight:CGFloat = 0
6262

0 commit comments

Comments
 (0)