You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WeakHashMap is a weak key but strong value map, but in those files, String is used as the key. String is something will always exist hold by jvm or something exist for a short period. So use string as key can't match your aim.
Because player name may be held by other plugins, using a String as the key here will make WeakHashMap unable to remove those PlayerProfiles in necessary. And, PlayerProfile contains a Player reference, it finally causing a memory leak problem.
To patch this problem, I recommend to remove those profiles manually by invoking remove method on Map of profiles when a player logs out and on Map of containers when a world unload.
(Required information in template has no value here, but if your guys really need them to fix this problem, I will post them in reply.)
The text was updated successfully, but these errors were encountered:
WeakHashMap is a weak key but strong value map, but in those files, String is used as the key. String is something will always exist hold by jvm or something exist for a short period. So use string as key can't match your aim.
Because player name may be held by other plugins, using a String as the key here will make WeakHashMap unable to remove those PlayerProfiles in necessary. And, PlayerProfile contains a Player reference, it finally causing a memory leak problem.
To patch this problem, I recommend to remove those profiles manually by invoking remove method on Map of profiles when a player logs out and on Map of containers when a world unload.
(Required information in template has no value here, but if your guys really need them to fix this problem, I will post them in reply.)
The text was updated successfully, but these errors were encountered: