Glide 内存溢出

来源:互联网 发布:报考东华大学网络教育 编辑:程序博客网 时间:2024/06/05 17:19

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);                            }                        }                    });
原创粉丝点击