Git Product home page Git Product logo

Comments (4)

JamesLiAndroid avatar JamesLiAndroid commented on June 21, 2024

还有就是如何进行内存的释放?

from largeimage.

LuckyJayce avatar LuckyJayce commented on June 21, 2024

View 持有图片,所以view不被持有等待GC回收的时候回收图片
onDetachedFromWindow的时候取消加载图片
你多次加载大图是用在什么样的场景
LargeImageView一般用在ViewPager里面,可缩放
UpdateImageView可以用在列表上,不可以缩放

from largeimage.

JamesLiAndroid avatar JamesLiAndroid commented on June 21, 2024

应该是我这边的问题,就是从列表中进入查看详情的时候,应该是每一次退出详情页面的时候没有对图片的引用进行手动回收,导致多次打开详情页面时,内存就oom了。我这边用的图片也是相当大(8k的长,1k的宽),所以我临时的解决方案是压缩了图片,质量变为原来的60%。我想知道的是,如何进行手动释放?光引用手动至空应该是不行的吧!

from largeimage.

LuckyJayce avatar LuckyJayce commented on June 21, 2024

图片加载已经优化,更新最新的库试下

from largeimage.

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.