Interface | Description |
---|---|
AssetCache |
AssetCache is an interface for asset caches. |
Class | Description |
---|---|
SimpleAssetCache |
SimpleAssetCache is an asset cache
that caches assets without any automatic removal policy. |
WeakRefAssetCache |
A garbage collector bound asset cache that handles non-cloneable objects.
|
WeakRefCloneAssetCache |
WeakRefCloneAssetCache caches cloneable assets in a weak-key
cache, allowing them to be collected when memory is low. |
com.jme3.asset.cache
contains the AssetCache
interface as well as its implementations.
AssetManager
to cache loaded assets for faster access if they are requested again.
Assets in jME3 are cached in such a way that if there are no instances of
that asset anymore in memory, then jME3 is likely to reclaim them.
Some asset types must be cloned prior to being used, for example, 3D models
cannot be stored in the cache as-is, because the user is likely to modify them
after loading them. To handle this, a copy of the asset is stored in the
cache instead. The asset cache that implements these rules is the
WeakRefCloneAssetCache
and it is used
for caching most asset types.