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 #13

Closed
houssemzaier opened this issue Feb 25, 2021 · 1 comment · Fixed by #14
Closed

Memory Leak #13

houssemzaier opened this issue Feb 25, 2021 · 1 comment · Fixed by #14

Comments

@houssemzaier
Copy link

Thank you for sharing that work !
In the ActivityDataBinding.kt which is using the lazy delegate.
You made an object implementing the lazy interface and storing the value in the binding reference.
-> line 12 private var binding: T? = null. (this var is static 💀 )
This is so bad and even as this causes a memory leak that will never free the attached activity to that reference.
You should make a simple class not a singleton.
I can do a pull request to fix that if you think that this could help you.
Just let me know 👍

@wada811
Copy link
Owner

wada811 commented Feb 27, 2021

@houssemzaier
Thank you for your report.
Please make a pull request 🙏

@wada811 wada811 mentioned this issue Mar 7, 2021
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

Successfully merging a pull request may close this issue.

2 participants