AssetManager ImplHandler: synchronized access in clearCache()

experimental
shadowislord 10 years ago
parent a7765cfb63
commit ca497f458a
  1. 6
      jme3-core/src/main/java/com/jme3/asset/ImplHandler.java

@ -204,8 +204,10 @@ public class ImplHandler {
public void clearCache(){ public void clearCache(){
// The iterator of the values collection is thread safe // The iterator of the values collection is thread safe
for (AssetCache cache : classToCacheMap.values()){ synchronized (classToCacheMap) {
cache.clearCache(); for (AssetCache cache : classToCacheMap.values()){
cache.clearCache();
}
} }
} }

Loading…
Cancel
Save