-
Notifications
You must be signed in to change notification settings - Fork 4k
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
LeakCanary stopped detecting leaked ViewModels #2496
Comments
damn we probably should have logged this to get it reported earlier. Thanks! The issue doesn't seem to be about ktx vs no ktx but simply that ViewModelStore was converted from Java to Kotlin and the map name changed: https://cs.android.com/androidx/platform/frameworks/support/+/8aa6ca1c924ab10d263b21b99b8790d5f0b50cc6:lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/ViewModelStore.kt;dlc=401acbbce9e14745594b8d3d7a5b3f25e5462dd4 PR welcome! |
@pyricau I wanted to make a test against this new version of Bumping the Kotlin version forces We can
What's your take on this? |
Could you make a local release then test it out against another app that's not sharing the gradle config (e.g. your app) ? |
I actually can't build a valid I've read this section but couldn't find hints there |
Maybe related? #2678 |
Description
LeakCanary doesn't detect leaked ViewModels when using
lifecycle-viewmodel-ktx
dependency.androidx.lifecycle:lifecycle-viewmodel-ktx
(version 2.6.1)The code it uses in
ViewModelClearedWatcher
for retrieving the ViewModel map always throws, because the-ktx
version usesmap
field, notmMap
.Version Information
The text was updated successfully, but these errors were encountered: