Class WeakRefAssetCache

java.lang.Object
com.jme3.asset.cache.WeakRefAssetCache
All Implemented Interfaces:
AssetCache

public class WeakRefAssetCache extends Object implements AssetCache
A garbage collector bound asset cache that handles non-cloneable objects. This cache assumes that the asset given to the user is the same asset that has been stored in the cache, in other words, AssetProcessor.createClone(java.lang.Object) for that asset returns the same object as the argument. This implementation will remove the asset from the cache once the asset is no longer referenced in user code and memory is low, e.g. the VM feels like purging the weak references for that asset.