国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

java - 使用glide加載圖片出現內存溢出

瀏覽:134日期:2023-11-30 18:30:29

問題描述

Pending exception java.lang.OutOfMemoryError: Failed to allocate a 1125012 byte allocation with 784248 free bytes and 765KB until OOMcom.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream, android.graphics.BitmapFactory$Options, com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, int, int, int, com.bumptech.glide.load.DecodeFormat) (Downsampler.java:217)at android.graphics.Bitmap com.bumptech.glide.load.resource.bitmap.Downsampler.decode(java.io.InputStream, com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, int, int, com.bumptech.glide.load.DecodeFormat) (Downsampler.java:151)at com.bumptech.glide.load.engine.Resource com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(java.io.InputStream, int, int) (StreamBitmapDecoder.java:50)at com.bumptech.glide.load.engine.Resource com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(java.lang.Object, int, int) (StreamBitmapDecoder.java:19)at com.bumptech.glide.load.engine.Resource com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(com.bumptech.glide.load.model.ImageVideoWrapper, int, int) (ImageVideoBitmapDecoder.java:39)

誰有解決方法,發給我謝謝

問題解答

回答1:

看這個log并不能發現什么,圖片加載出現oom是非常高概率的。請仔細判斷1)是否連續的加載了大圖而沒有及時回收?2)是否哪里內存泄漏了?可以嘗試用LeakCanary檢查下內存泄漏,或者用工具持續檢查內存占用狀況

標簽: java
相關文章:
主站蜘蛛池模板: 莲花县| 康保县| 娱乐| 贵南县| 牡丹江市| 安阳市| 罗山县| 师宗县| 兰坪| 孝感市| 盐源县| 温州市| 平凉市| 清水县| 十堰市| 汕头市| 云林县| 遂宁市| 台北县| 漳平市| 常熟市| 盘山县| 偃师市| 岢岚县| 华蓥市| 七台河市| 灵璧县| 工布江达县| 抚顺县| 新乡市| 中阳县| 偏关县| 津市市| 平泉县| 当涂县| 百色市| 牟定县| 徐汇区| 平顺县| 南安市| 体育|