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 leaks / retain cycles #653

Closed
ejensen opened this issue Feb 11, 2021 · 1 comment · Fixed by #660
Closed

Memory leaks / retain cycles #653

ejensen opened this issue Feb 11, 2021 · 1 comment · Fixed by #660
Labels
needs investigation An issue that has more questions to answer or otherwise needs work to fully understand the issue

Comments

@ejensen
Copy link
Contributor

ejensen commented Feb 11, 2021

Describe the problem

Lock's UI leaks memory. The leaks are caused by retain cycles.

memory-leaks

What was the expected behavior?

Lock does not leak memory

Reproduction

Memory is leaked when the Lock UI is dismissed:

  • Run the Lock demo app
  • Present the Lock UI
  • Dismiss the Lock UI
  • Notice that memory is leaked
    • For instance, the Presenter is never deallocated
Presenter-leaks.mp4

Memory is leaked when switching between log in and sign up:

  • Run the Lock demo app
  • Present the Lock UI
  • Switch between the login and sign up views
  • Notice that the view's memory is leaked
    • For instance, a new CredentialsView is created each time the login view is shown, but never deallocated
View-leaks.mp4

Can the behavior be reproduced using the included Lock.swift demo app? Yes

Environment

  • Version of Lock.swift used: 2.21.0
  • Version of iOS: 14.4
  • Version of Xcode: 12.4
@Widcket
Copy link
Contributor

Widcket commented Feb 11, 2021

@ejensen Thanks for raising this, I'll be taking a look.

@Widcket Widcket added the needs investigation An issue that has more questions to answer or otherwise needs work to fully understand the issue label Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation An issue that has more questions to answer or otherwise needs work to fully understand the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants