question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fresco won't recycle the memory on Lollipop .

See original GitHub issue

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

11

222

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);

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
erikandrecommented, Jan 19, 2018

Closing due to lack of updates.

0reactions
paranecommented, Jul 29, 2017

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why fresco chose not put bitmap in ashmem on android 5.0 or ...
Yes, Google disabled purgeable bitmaps in Android 5.0. ... In Fresco documentation they mention: Android 5.0 and newer has much improved memory management...
Read more >
Fix the storage errors now! - Adobe Support Community
The issue is still there. Adobe Fresco asks for 3GB free storage and doesnˋt start without freeing the memory. For what does Fresco...
Read more >
Class Index - Fresco API
Layer of memory cache stack responsible for managing eviction of the the cached items. AbstractDataSource<T>, An abstract implementation of DataSource interface ...
Read more >
fresco 拾遗- 简书
Ashmem不能被Java应用直接处理,但是也有一些例外,图片就是其中之一。当你创建一张没有经过压缩的Bitmap的时候,Android的API允许你指定是否是可清除的。
Read more >
GEA – engineering for a better world
Milk Cooling & Storage ... Ball Lollipop Equipment · Coated Lollipop Equipment · Confectionery Packaging Equipment · Flat Lollipop Equipment. Valves & Pumps....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found