You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to have a Cache<K, V> class that works like Map in most respects but implements memory-pressure eviction semantics. This presumably needs help from the VM.
Android has an LruCache that has an api that's proven flexible. On the link above, the documentation shows how to turn it into a bitmap cache that only allows a certain amount of memory to be used by overriding the sizeOf method. The create and entryRemoved methods have also proven very helpful for releasing resources when they are being removed from the cache.
I imagine these features might also be helpful in Flutter.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
ScottPierce commentedon Jun 12, 2016
Android has an LruCache that has an api that's proven flexible. On the link above, the documentation shows how to turn it into a bitmap cache that only allows a certain amount of memory to be used by overriding the
sizeOfmethod. ThecreateandentryRemovedmethods have also proven very helpful for releasing resources when they are being removed from the cache.I imagine these features might also be helpful in Flutter.
jonahwilliams commentedon Oct 8, 2024
We're not going to add this
github-actions commentedon Oct 22, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.