void android.graphics.Bitmap.recycle()

本文详细介绍了Android中Bitmap.recycle()方法的功能及其使用注意事项。该方法用于释放与位图关联的内存并标记位图为“已死”,这意味着之后调用getPixels()或setPixels()将抛出异常,并且位图将不再绘制任何内容。此操作不可逆,因此仅应在确定位图不再使用时调用。
AI助手已提取文章相关产品:

void android.graphics.Bitmap.recycle()

Free up the memory associated with this bitmap's pixels, and mark the bitmap as "dead", meaning it will throw an exception if getPixels() or setPixels() is called, and will draw nothing. This operation cannot be reversed, so it should only be called if you are sure there are no further uses for the bitmap. This is an advanced call, and normally need not be called, since the normal GC process will free up this memory when there are no more references to this bitmap.

您可能感兴趣的与本文相关内容

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值