Memory cache keeps growing when using non-static images in Recyclerview
#2,502 建立於 2020年5月19日
描述
Description
I'm using lots of .webp images in my Recyclerview. And if I keep scrolling the Recyclerview, the native memory keeps growing until it reaches the maximum memory cache limit. I've also tested with the demo by jumping between fragments which has .webp images in it, still the native memory grows to the limit. It looks like Fresco will create a new cache for the same image every time the image got loaded.
I've already tried several ways, like reduce the memory cache limit or clear memory cache every time I leave the page. but these solutions can't solve the problem without affecting user's experience. Is there any way to fix or avoid this problem?
Reproduction
Any app that is using Fresco to load non-static images should be able to reproduce this problem.
Additional Information
Using .gif format has the same problem.
- Fresco version: [2.2.0]
- Platform version: [Android 9 / 10] (I've only tested with these two version)