glide icon indicating copy to clipboard operation
glide copied to clipboard

The memory keep increase

Open 54lazycat opened this issue 3 years ago • 2 comments
trafficstars

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

54lazycat avatar Mar 23 '22 07:03 54lazycat

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.

neurondigital avatar May 12 '22 17:05 neurondigital

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.

akhilsreekar avatar Aug 29 '22 09:08 akhilsreekar