Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Fixed sharedpreferences returns garbage after few runs #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zubayer87
Copy link

Fixed sharedpreferences returns garbage after few runs. It is also mentioned here: https://developer.android.com/reference/android/content/SharedPreferences
"Caution: The preference manager does not currently store a strong reference to the listener. You must store a strong reference to the listener, or it will be susceptible to garbage collection. We recommend you keep a reference to the listener in the instance data of an object that will exist as long as you need the listener."

Fixed sharedpreferences returns garbage after few runs. It is also mentioned here: https://developer.android.com/reference/android/content/SharedPreferences
"Caution: The preference manager does not currently store a strong reference to the listener. You must store a strong reference to the listener, or it will be susceptible to garbage collection. We recommend you keep a reference to the listener in the instance data of an object that will exist as long as you need the listener."
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@zubayer87
Copy link
Author

@googlebot I signed it!

@codingjeremy codingjeremy changed the base branch from master to main September 29, 2020 19:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants