handsomecode / InteractiveSideMenu

iOS Interactive Side Menu written in Swift.
Apache License 2.0
708 stars 164 forks source link

Memory leak #91

Open phil-alekhin opened 6 years ago

phil-alekhin commented 6 years ago

Hi guys! Thanks for your library.

Now I push MenuContainerViewController into a navigation stack and when I pop to a root view controller the controller is not deallocating. I suppose a reason is that MenuViewController has the strong reference to its container.

My solution is a weak reference to the container.

open class MenuViewController: UIViewController {
    public weak var menuContainerViewController: MenuContainerViewController?
    weak var navigationMenuTransitionDelegate: MenuTransitioningDelegate?

    @objc func handleTap(recognizer _: UIGestureRecognizer) {
        menuContainerViewController?.hideSideMenu()
    }
} 

Am I right? Thank you =)

Kaustubh2018 commented 4 years ago

Same thing I faced

Kaustubh2018 commented 4 years ago

Need Answer from owner