SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.18k stars 224 forks source link

Is there any way to clear a running gif from your RAM when you are no longer looking at it? #280

Closed Animatnetic closed 10 months ago

Animatnetic commented 10 months ago

As more gifs are added, this RAM measurement increases and increases. I have not had the patience to sit down and see what happens if it reaches a high enough number to crash or cause a slow down but does trigger some concern. Can someone please clarify this for me?

Screenshot 2023-11-11 at 19 08 28

I am asking for SwiftUI use

dreampiggy commented 10 months ago

The same. Just call SDImageCache.removeMemoryCache when needed.

Actually if you use the AnimatedImage, it will use a buffer count to determine the RAM pressure and free the frame if needed

Animatnetic commented 10 months ago

Thank you very much, I shall close the issue in positive light due to your clarification.