Glide 内存溢出

论坛 期权论坛 脚本     
匿名网站用户   2020-12-19 18:41   31   0

This helped me remove the leaks when using an adapter:

            Glide.with(context)
                    .load(imageURL))
                    .asBitmap()
                    .dontAnimate()
                    .diskCacheStrategy(DiskCacheStrategy.RESULT)
                    .into(new SimpleTarget<Bitmap>() {
                        @Override
                        public void onResourceReady(Bitmap bitmap, GlideAnimation anim) {

                            if (bitmap != null) {

                                imageView.setImageDrawable(bitmap);

                            }
                        }
                    });
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP