Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Cache] Fix Memory leak#44002
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Cache] Fix Memory leak#44002
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedNov 10, 2021
Hey! To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done? Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review. Cheers! Carsonbot |
nicolas-grekas commentedNov 10, 2021
@Jeroeny can you please try this patch a report back if it fixes your issue? |
Jeroeny commentedNov 11, 2021
It no longer seems to leak in the reproducer after having applied these changes. 👍 |
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedNov 11, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This property has been added to save calling Since#40317, it's possible to skip calling This property has been added with the assumption that the number of different keys is upper bounded. |
a1812 commentedNov 11, 2021
i agree with the idea of 1000 keys, a@Jeroeny ? |
Jeroeny commentedNov 11, 2021
Sounds good to me. Upon reaching the limit, do you want to purge the entire array or slice it so that it's maxed out at 1000 items (like the ArrayAdapter cache) ? |
nicolas-grekas commentedNov 11, 2021
The logic in ArrayAdapter is too involving for this. I'd suggest halving the array instead: |
Uh oh!
There was an error while loading.Please reload this page.
881275c to2ad61b8Comparenicolas-grekas commentedNov 12, 2021
Thank you@a1812. |
Uh oh!
There was an error while loading.Please reload this page.
Rough decision as an example of how to stop a leak