I show some picture using viewpager. Viewpager item is Fragment.
Even though Fregment is detroy. GC is not occur.
Keep add Image to memory.


init Fresco
ImagePipelineConfig config = OkHttpImagePipelineConfigFactory
.newBuilder(this, DCB_RestfulAdapter.getClient())
.build();
Fresco.initialize(this, config);
showing image
GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(getResources());
GenericDraweeHierarchy hierarchy = builder.setFadeDuration(300)
.setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER)
.setProgressBarImage(new CustomProgressbarDrawable(this))
.build();
hierarchy.setPlaceholderImage(R.drawable.ic_placeholder);
ImageRequest imageRequest = ImageRequestBuilder.newBuilderWithSource(Uri.parse(url))
.setResizeOptions(new ResizeOptions(Utils.getScreenWidth(getActivity()), Utils.getScreenHeight(getActivity())))
// .setResizeOptions(new ResizeOptions(300, 300))
.setAutoRotateEnabled(true)
.build();
DraweeController draweeController = Fresco.newDraweeControllerBuilder()
.setImageRequest(imageRequest)
.setAutoPlayAnimations(true)
.setOldController(view.getController())
.build();
view.setController(draweeController);
view.setHierarchy(hierarchy);
view.setAspectRatio(1.33f);
Fresco maintains bitmap cache and it's default size limit is equal to 1/4 of the heap size. Can you confirm that Bitmaps take more space than that ?
occur OOM.
A also saw strange behaviour on Lollipop (Nexus 5). Images inside RecyclerView became black, scrolling became slow after some usage. And then app crashes if I continue to scroll this collection of images. Looks like after close/open this Fragment with images Fresco do not free memory.
@DASAR yes, that situation also happened in all my Lolliopop version cellphones.
+1
Closing due to lack of updates.