I just experimenting with ImageAsset and Image. I ...
# compose-desktop
t
I just experimenting with ImageAsset and Image. I am constructing the Image from a bytestream using
Copy code
Image.makeFromEncoded(compressedImage.byteArray).asImageAsset()
It looks like the memory allocation for the image is not freed automatically when i remove all references to the ImageAsset. What do i have to do to cleanup the memory when i do not need the image anymore? In android i do have to call Bitmap.recycle but for Image i only found Image.reset which do not free the memory.
r
You never have to call Bitmap.recycle on Android
t
Thx for the fast response. But for compose-desktop i do have a problem with memory filling up when i load images in a LazyColumFor list.
j
Can you create a minimal repro that demonstrates the issue and file a bug?
t
I did a minimal implementation and did not found the same memory consumption. It looks stable. So it looks like i do have something else wrong in my code. I will do some more investigations.