mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-06 19:09:31 +01:00
Fix potential memory leak
This commit is contained in:
parent
cf456cff81
commit
a9f29da4f8
@ -40,6 +40,7 @@ public class ContextManager<T> {
|
|||||||
private final List<ContextListener<T>> listeners = new CopyOnWriteArrayList<>();
|
private final List<ContextListener<T>> listeners = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
private final LoadingCache<T, ContextSet> cache = CacheBuilder.newBuilder()
|
private final LoadingCache<T, ContextSet> cache = CacheBuilder.newBuilder()
|
||||||
|
.weakKeys()
|
||||||
.expireAfterWrite(50L, TimeUnit.MILLISECONDS)
|
.expireAfterWrite(50L, TimeUnit.MILLISECONDS)
|
||||||
.build(new CacheLoader<T, ContextSet>() {
|
.build(new CacheLoader<T, ContextSet>() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user