Fix a stupid memleak

This commit is contained in:
tarsin authored and GitHub committed 2023-02-18 01:08:56 +08:00
1 parent 747f23bfe1
commit aa485547a6
1 file changed
+1 -1
+1 -1
View File
@@ -56,8 +56,8 @@ class Image private constructor(private val src: CloseableSource) {
(mObtainedDrawable as? AnimatedImageDrawable)?.stop()
(mObtainedDrawable as? BitmapDrawable)?.bitmap?.recycle()
mObtainedDrawable?.callback = null
mObtainedDrawable = null
(mObtainedDrawable as? AnimatedImageDrawable)?.let { src.close() }
mObtainedDrawable = null
}
companion object {