MoreMobHeads2

MoreMobHeads2

17.2k Downloads

Player memory leak

ChanceSD opened this issue ยท 3 comments

commented

There's a memory leak of Player instances in chanceRandoms
image
They remain there even after a player leaves the server.
I was going to make a pull request fixing it but for some reason can't compile it and weirdly your latest commits also include no code.

Anyway, here's what I was going to do and should be enough to fix the issue.

	/**
	 * Removes player from map when they leave the server
	 */
	@EventHandler
	public void onPlayerQuit(PlayerQuitEvent event) {
		chanceRandoms.remove(event.getPlayer());
	}
commented

Added suggestion. Thank you for pointing this out.

commented

Thank you. Any estimate on when you will upload the update with this?