add check for same cache size
This commit is contained in:
parent
fe40ec722d
commit
b1ba628987
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ public class ResourceManager {
|
||||||
maxCacheSize += layerTiles;
|
maxCacheSize += layerTiles;
|
||||||
}
|
}
|
||||||
long freeMemory = Runtime.getRuntime().freeMemory() / (1024 * 1024L);
|
long freeMemory = Runtime.getRuntime().freeMemory() / (1024 * 1024L);
|
||||||
if (freeMemory > 0 || maxCacheSize < bitmapTilesCache.getMaxCacheSize()) {
|
if (maxCacheSize != bitmapTilesCache.getMaxCacheSize() && (freeMemory > 0 || maxCacheSize < bitmapTilesCache.getMaxCacheSize())) {
|
||||||
log.info("Bitmap tiles to load in memory : " + maxCacheSize);
|
log.info("Bitmap tiles to load in memory : " + maxCacheSize);
|
||||||
bitmapTilesCache.setMaxCacheSize(maxCacheSize);
|
bitmapTilesCache.setMaxCacheSize(maxCacheSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue