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

Use WeakRef for Single ViewModel Cache #4661

Merged
merged 5 commits into from Aug 1, 2023

Conversation

Cheesebaron
Copy link
Member

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bugfix

⤵️ What is the current behavior?

SingleViewModel Cache would hold strong refs to ViewModels which is dangerous and could lead to leaks

🆕 What is the new behavior (if this is a feature change)?

Make the strong ref a weak ref instead

💥 Does this PR introduce a breaking change?

Shouldn't no

🐛 Recommendations for testing

📝 Links to relevant issues/docs

🤔 Checklist before submitting

@Cheesebaron Cheesebaron added t/bug Bug type p/android Android platform labels Aug 1, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Cheesebaron Cheesebaron merged commit b351cfd into develop Aug 1, 2023
6 of 7 checks passed
@Cheesebaron Cheesebaron deleted the bugfix/single-vm-cache-weakref branch August 1, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/android Android platform t/bug Bug type
Development

Successfully merging this pull request may close these issues.

None yet

1 participant