iconomy5legacy / iConomy

iConomy 5 (Towny Edition)
15 stars 14 forks source link

Potential memory leak #20

Closed illumeleet closed 3 years ago

illumeleet commented 3 years ago

As described here and here, saving players may lead to memory leaks and probably needs to be replaced with uuid instead of player object.

The reason why i started investigating and opened this issue afterwards is because i took heapdump of my server and analyzed it, here's the results i've got:

image image

https://github.com/iconomy5legacy/iConomy/blob/b90b24fadda6877ccc004a912fba2c05330f113b/src/main/java/com/iConomy/iConomy.java#L246 https://github.com/iconomy5legacy/iConomy/blob/b90b24fadda6877ccc004a912fba2c05330f113b/src/main/java/com/iConomy/util/Messaging.java#L137