Skip to content

Release Ram #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tanlucvo opened this issue Aug 16, 2023 · 3 comments
Closed

Release Ram #80

tanlucvo opened this issue Aug 16, 2023 · 3 comments

Comments

@tanlucvo
Copy link

Don't release RAM after removeFromSuperview or stopAnimating

@dreampiggy
Copy link
Contributor

dreampiggy commented Aug 16, 2023

SDImageCache use NSCache which retain your UIImage.

Most cases you can ignore this, if you want immediately free, call [SDImageCache.sharedCache.memoryCache removeObjectForKey:] or removeAllObjects (Or this is also OK: https://sdwebimage.github.io/documentation/sdwebimage/sdimagecache-swift.class/clearmemory())

Or you can load without memory cache support with context @{SDWebImageQueryCacheType = @(SDImageCacheTypeDisk)}, but this cause frequcently decoding cost (on CPU) when you refresh the UIView frequcently

@dreampiggy
Copy link
Contributor

I think this is usage of SDWebImage , not related to this WebP decoder. See: https://github.com/SDWebImage/SDWebImage/wiki/Common-Problems

@tanlucvo
Copy link
Author

Thanks you 🚀🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants