SPTextureCache Class Reference
| Inherits from | NSObject |
| Declared in | SPTextureCache.h |
Overview
The texture cache keeps weak references to all loaded textures.
When you try to instantiate a texture that is already in memory, it is taken from the cache instead of loading it again.
This is an internal class. You do not have to use it manually.
Tasks
-
– textureForKey:Returns the texture stored with the given key, or
nilif that texture is not available. -
– setTexture:forKey:Stores a weak reference to the given texture. The texture is not retained; when it is deallocated, it is automatically removed from the cache.
-
– purgeRemoves all references.
Instance Methods
purge
Removes all references.
- (void)purgeDiscussion
Removes all references.
Declared In
SPTextureCache.hsetTexture:forKey:
Stores a weak reference to the given texture. The texture is not retained; when it is deallocated, it is automatically removed from the cache.
- (void)setTexture:(SPTexture *)obj forKey:(NSString *)keyDiscussion
Stores a weak reference to the given texture. The texture is not retained; when it is deallocated, it is automatically removed from the cache.
Declared In
SPTextureCache.h