Open MrMks opened 2 years ago
hey, i created a branche "fixplayersnapshot" on my fork (https://github.com/StateMC/ModularWarfare/tree/fixplayersnapshot) Please tell me if my fix work, then i will create a pull request to share the fix with everyone :)
Yes, you are both right. When a player leave the world, the PlayerData and the latest 20 hitbox snapshots stills exists on the hashmap.
@gameusefly If your commit is working in server-side/client-side feel free to make a pull request to solve the problem. Thanks
@gameusefly I tested it in a forge only env, and it works well on server but doesn't on client.
After i leave the game, clientSideDatas are still there.
@MrMks i pushed a fix for that, feel free to test it :)
@gameusefly ok, it works now.
The EntityPlayer leak is now fixed in the newest version of the stable branche
I checked the heapdump with memory analyze tool (by Eclipse), and it shows that there is a reference link to the instance of EntityPlayer.
And then i checked the code, it seems that there is no methods to remove out-of-dated instances.
So, i think it must be a memory leak issue.