DroidCast_raw icon indicating copy to clipboard operation
DroidCast_raw copied to clipboard

可能的 `Explicit termination method 'HardwareBuffer.close' not called` 异常

Open Torther opened this issue 8 months ago • 1 comments

Image

可能出现的 HardwareBuffer 未释放,待排查修复

Torther avatar May 09 '25 10:05 Torther

这里可能缺了个 buffer.close()

https://github.com/Torther/DroidCast_raw/blob/DroidCast_raw/app/src/main/java/ink/mol/droidcast_raw/ScreenCaptorUtils.kt#L122

The bitmap will keep a reference to the buffer so that callers can safely close the HardwareBuffer without affecting the Bitmap.

https://developer.android.com/reference/android/graphics/Bitmap#wrapHardwareBuffer(android.hardware.HardwareBuffer,%20android.graphics.ColorSpace)

swordfeng avatar May 24 '25 09:05 swordfeng