LuckPerms

LuckPerms

41.4k Downloads

Memory leak

caoli5288 opened this issue ยท 2 comments

commented

luckperm
DO NOT USE PLAYER INSTANCE AS CHACHE KEY

commented

Should be resolved in the latest version, which you can get here: https://luckperms.github.io/

Players are still used as cache keys, but the records expire, or are invalidated when the player quits.

https://github.com/lucko/LuckPerms/blob/bf64f465a8763fb2bfb5cb679a6f82e831fb62d6/bukkit/src/main/java/me/lucko/luckperms/bukkit/contexts/BukkitContextManager.java#L47-L60

The previous implementation (and presumably the one you're using) used weak references, which should also have been sufficient.

https://github.com/lucko/LuckPerms/blob/203612761206579b9b69a5f4c9ba499efd2ae07b/common/src/main/java/me/lucko/luckperms/common/contexts/ContextManager.java#L65-L69

My guess is that you have some other plugin holding onto the references and preventing them from being GCed.

commented

Ok I'll test the latest version