InteractiveSideMenu icon indicating copy to clipboard operation
InteractiveSideMenu copied to clipboard

Memory leak

Open phil-alekhin opened this issue 7 years ago • 2 comments

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 =)

phil-alekhin avatar May 10 '18 21:05 phil-alekhin

Same thing I faced

Kaustubh2018 avatar Jan 22 '20 06:01 Kaustubh2018

Need Answer from owner

Kaustubh2018 avatar Jan 22 '20 06:01 Kaustubh2018