|
|
|
@ -25,9 +25,7 @@ public class IconManager {
|
|
|
|
|
|
|
|
|
|
public static boolean initialized = false; |
|
|
|
|
public static ArrayList<IconSet> iconSets = new ArrayList<>(2); |
|
|
|
|
; |
|
|
|
|
public static HashMap<String, WeakReference<Icon>> cache = new HashMap<>(60); |
|
|
|
|
; |
|
|
|
|
public static HashMap<String, WeakReference<Icon>> disableCache = new HashMap<>(60); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -130,6 +128,7 @@ public class IconManager {
|
|
|
|
|
*/ |
|
|
|
|
public static void clearCache() { |
|
|
|
|
cache.clear(); |
|
|
|
|
disableCache.clear(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -137,11 +136,13 @@ public class IconManager {
|
|
|
|
|
*/ |
|
|
|
|
public static void clearIconCache(String id) { |
|
|
|
|
cache.remove(id); |
|
|
|
|
disableCache.remove(id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void clearIconSetCache(@NotNull IconSet set) { |
|
|
|
|
for (String id : set.getIds()) { |
|
|
|
|
cache.remove(id); |
|
|
|
|
disableCache.remove(id); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|