bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.65k stars 6.12k forks source link

The memory keep increase #4773

Open 54lazycat opened 2 years ago

54lazycat commented 2 years ago

Glide Version: 4.11.0

Integration libraries: okhttp3-3.12.0

Device/Android Version: RedMi k40 / android 12

Issue details / Repro steps / Use case background: when load gif, the memory keep increase. Seems glide create a lot of Integer object.

glide_issure

neurondigital commented 2 years ago

same issue. Exact line. I noticed that this happens when loading Gifs in a BottomSheet on Android 12.

Steps to reproduce: 1) Load a recyclerview with glide gifs in a BottomSheet 2) When the Bottom sheet is collapsed or hidden, the memory keeps increasing rapidly until we get an out of memory error.

It's like glide is caching data which cannot be shown since the Imageview is not visible, but since the view has not been officially destroyed then glide keeps loading the gif frames.

akhilsreekar commented 2 years ago

This happens not only in android 12 but on the previous versions also. Have faced this issue in android 11 and android 8 versions also on some of the devices(Working fine on oneplus. But issue with samsung). Is there any fix for this or some other library that I can use.