-
Notifications
You must be signed in to change notification settings - Fork 169
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
Android Leak Memory on Purchases.getOfferings() #687
Comments
👀 SDKONCALL-276 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out! |
Thanks for reporting this issue. Can you please share a snippet with the changes you did to make the leak disappear? We are using Result in the same way in all our method calls so it's kinda weird this only happens for |
@vegaro Sure here is my workaround
I use bunch of other plugins so I think they will also access the activity. I don't know but maybe the problem is at stream listener. It's weird that I don't see leak report anymore after applying this change. |
Environment
flutter doctor
Version of
purchases-flutter
4.12.0
Testing device version e.g.: Android API 28
How often the issue occurs - Problem is reproducible in dev
[Debug logs]
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
Offerings offerings = await Purchases.getOfferings()
Other information
Problem seems gone when I replaced
getOnResult(result)
with a dedicatedResult
var for getOffering that can be set null when engine detachedDescribe the bug
Plugin leaked main activity context
The text was updated successfully, but these errors were encountered: