com.jme3.asset.cache: javadoc fixes
This commit is contained in:
parent
938dc3640b
commit
c6317cc531
@ -77,7 +77,6 @@ public class WeakRefAssetCache implements AssetCache {
|
||||
// might not even have this asset anymore, it is OK.
|
||||
if (assetCache.remove(ref.assetKey) != null){
|
||||
removedAssets ++;
|
||||
//System.out.println("WeakRefAssetCache: The asset " + ref.assetKey + " was purged from the cache");
|
||||
}
|
||||
}
|
||||
if (removedAssets >= 1) {
|
||||
@ -92,10 +91,6 @@ public class WeakRefAssetCache implements AssetCache {
|
||||
// thread is loading an asset with the same key ..
|
||||
AssetRef ref = new AssetRef(key, obj, refQueue);
|
||||
assetCache.put(key, ref);
|
||||
|
||||
// Texture t = (Texture) obj;
|
||||
// Image i = t.getImage();
|
||||
// System.out.println("add to cache " + System.identityHashCode(i));
|
||||
}
|
||||
|
||||
public <T> T getFromCache(AssetKey<T> key) {
|
||||
|
@ -42,7 +42,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* <codeWeakRefCloneAssetCache</code> caches cloneable assets in a weak-key
|
||||
* <code>WeakRefCloneAssetCache</code> caches cloneable assets in a weak-key
|
||||
* cache, allowing them to be collected when memory is low.
|
||||
* The cache stores weak references to the asset keys, so that
|
||||
* when all clones of the original asset are collected, will cause the
|
||||
|
30
jme3-core/src/main/java/com/jme3/asset/cache/package.html
vendored
Normal file
30
jme3-core/src/main/java/com/jme3/asset/cache/package.html
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<code>com.jme3.asset.cache</code> contains the {@link com.jme3.asset.cache.AssetCache}
|
||||
interface as well as its implementations.<br>
|
||||
|
||||
<p>
|
||||
|
||||
<h3>AssetCaches</h3>
|
||||
The asset cache implementations are used by {@link com.jme3.asset.AssetManager}
|
||||
to cache loaded assets for faster access if they are requested again.
|
||||
<p>
|
||||
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
|
||||
{@link com.jme3.asset.cache.WeakRefCloneAssetCache} and it is used
|
||||
for caching most asset types.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user