SampleProvider / Meadow-Guarder-old2

A free browser RPG game.
http://meadowguarder.herokuapp.com/
Other
16 stars 7 forks source link

Memory leak due to undeleted sockets and players #367

Open spsquared opened 2 years ago

spsquared commented 2 years ago

Upon leaving, the socket object still exists and so does the player. This leads to memory leaks and the server slowly uses more of it's heap over time as users connect and disconnect. This is an issue when people are reloading a lot or there are a lot of people online. It's best to fix this before Meadow Guarder starts becoming bigger. Just set socket to null when the user disconnects. (also set player to null and other references that aren't needed anymore)