GithubHelp home page GithubHelp logo

Comments (4)

Piasy avatar Piasy commented on July 19, 2024

@jinzw1993 确实是这样,使用 ViewPager 的话,每个 View 都没有重用,那么加载到内存中的 Bitmap 也就不会释放,因此会导致内存持续上涨(但是每一张图带来的内存增长应该还好)。

可以考虑换成类似于 RecyclerView 的 View 重用方案,这样就能把内存占用限制住(不会持续增加)。

在查看多图时,BIV 相对于 Fresco 会有两大优势:1. 每一张大图占用的内存小得多;2. Fresco 会把加载过的 Bitmap 缓存在内存中,即便 View 被重用或者销毁,因此用 Fresco 无法限制住内存占用。

我自己项目中确实也遇到了这个问题,但是最近没有时间进一步优化并整理出来,抱歉。欢迎提交 pr!

from bigimageviewer.

hss01248 avatar hss01248 commented on July 19, 2024

问题已解决,看这里:
https://github.com/hss01248/ImageLoader/blob/master/app/src/main/java/com/hss01248/imageloaderdemo/MyAdapter.java

from bigimageviewer.

ahkkfh avatar ahkkfh commented on July 19, 2024

现在有解决这个问题吗?

from bigimageviewer.

Piasy avatar Piasy commented on July 19, 2024

For image list widget, track #26

from bigimageviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.