Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak #91

Open
phil-alekhin opened this issue May 10, 2018 · 2 comments
Open

Memory leak #91

phil-alekhin opened this issue May 10, 2018 · 2 comments

Comments

@phil-alekhin
Copy link

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
Copy link

Same thing I faced

@Kaustubh2018
Copy link

Need Answer from owner

omerozk added a commit to omerozk/InteractiveSideMenu that referenced this issue Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants