Android memory leak with Glide

前端 未结 3 1847
北海茫月
北海茫月 2021-02-09 01:40

I have an activity which loads pictures in ImageViews with glide. Here is a sample of my glide code:

    Glide.with(ImageVOne.getContext())
            .load(geo         


        
3条回答
  •  终归单人心
    2021-02-09 02:08

    Using Glide would not be the issue of memory leak, you might keep some other reference of your activity like listener or you forgot to unregister something that have been registered while starting the activity which will results your whole activity cant get Garbage collected.

    So every time you starting your activity or fragment it will create new instance while the old instance also keep in memory because of any unregistered culprit Instance.

    use Eclipse MAT to find your leak.

提交回复
热议问题