qmathe / DropDownMenuKit

UIKit drop down menu, simple yet flexible and written in Swift
Other
302 stars 38 forks source link

Menu and container not released #21

Closed IngwarSkjold closed 7 years ago

IngwarSkjold commented 7 years ago

Variable 'container' in DropDownMenu.swift (line 23) is strong reference, therefore when container is removed from view hierarhy it maintains referenced by DropDownMenu and can not be destroyed. Solution: make container weak reference and perform necessary checks in methods show, hide and visibleContentOffset.didSet

qmathe commented 7 years ago

Thanks for catching this. Should be fixed now.

IngwarSkjold commented 7 years ago

Thanks for resolving.