Skip to content

Memory cache keeps growing when using non-static images in Recyclerview #2502

Description

@nevermore1993

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions