|
JubeatPlus 3.9.11
|
Holds decoded images so a screen change does not re-read them from disk. More...
#include <ImageCache.h>


Instance Methods | |
| (instancetype) | - init |
| Creates the backing cache and caps it at a hundred and twenty-eight entries. | |
| (nullable UIImage *) | - getResPNG: |
| Returns the named image, loading and caching it on a miss. | |
| (void) | - clear |
| Drops everything held. | |
Properties | |
| ImageCache * | sharedCache |
| The shared instance. | |
Holds decoded images so a screen change does not re-read them from disk.
Backed by an NSCache capped at a hundred and twenty-eight entries, so entries may be evicted under memory pressure as well as by that limit. A caller must never assume a name it fetched once is still held.
| - (void) clear |
Drops everything held.
Sent on every screen transition except a game restart or replay, which is what keeps those two fast.
| - (nullable UIImage *) getResPNG: | (nullable NSString *) | name |
Returns the named image, loading and caching it on a miss.
A nil name yields nil without touching the cache. A load that fails is not cached, so a missing resource is retried on every call rather than remembered as absent.
| name | The resource's base name, with no scale suffix and no extension. |
| - (instancetype) init |
Creates the backing cache and caps it at a hundred and twenty-eight entries.
|
readnonatomicassign |
The shared instance.
A dispatch_once singleton; nothing vends any other instance.