bumptech / glide

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

How to cancel readyAsyncCalls ? There are many AsyncCall in readyAsyncCalls,They take up alot of memory and cause OOM #4566

Open freshxu opened 3 years ago

freshxu commented 3 years ago

Glide Version: 4.11.0

Integration libraries: 'com.github.bumptech.glide:okhttp3-integration:4.11.0'

Device/Android Version: Android 9

Issue details / Repro steps / Use case background: This problem appeared when running monkey test,when the network is not good, there is a large amount of memory leaks. After analyzing the hprof file,I found that there are 40000+ AsyncCall objects and they occupy 80m+ memory。

so I want to know how to cancle these AsyncCalls when the memory is low.