Skip to content
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

Cache imageNamed #22

Open
dtorres opened this issue Apr 27, 2013 · 1 comment
Open

Cache imageNamed #22

dtorres opened this issue Apr 27, 2013 · 1 comment

Comments

@dtorres
Copy link
Owner

dtorres commented Apr 27, 2013

The current implementation of UIImage caches the instances created by this method. And GIFs are really expensive to create.
So, why not?

@nickoneill
Copy link
Contributor

I'm not entirely sure... the implications of caching GIFs are more significant than just caching images because of their potential size. At the very least, one needs to be able to turn caching off.

I implement a simple NSCache for the reusable GIFs I add to OLImageViews as a property of my view controller. Doing the same thing by default would mean adding a singleton to the OL classes unless you wanted to make a OLImageCache class... then do a setCacheObject: for each OLImage object you have? Seems like that route is as no less work than making your own NSCache.

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

No branches or pull requests

2 participants