Fixed memory leaks in Disguise and Recall.

Removed debug messages in ItemMapManager
This commit is contained in:
Jonathan Williams 2015-11-30 23:49:16 -06:00
parent 482ec8a120
commit 03a1f19df9
3 changed files with 3 additions and 8 deletions

View File

@ -880,8 +880,6 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
@EventHandler
public void PlayerQuit(PlayerQuitEvent event)
{
undisguise(event.getPlayer());
for (DisguiseBase disguise : _disguisePlayerMap.keySet())
{
_disguisePlayerMap.get(disguise).remove(event.getPlayer());
@ -891,6 +889,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
{
_lastRabbitHop.get(disguise).remove(event.getPlayer().getEntityId());
}
undisguise(event.getPlayer());
}
private void prepareChunk(Location loc)

View File

@ -740,16 +740,13 @@ public class ItemMapManager extends MiniPlugin
boolean outsideMap = startingZ < -_halfMapSize;
TimingManager.start("renderMap.scanWorldMap");
scanWorldMap(startingX, startingZ, !outsideMap);
TimingManager.stop("renderMap.scanWorldMap");
if (outsideMap)
{
return;
}
TimingManager.start("renderMap.scale loop");
for (int scale = 1; scale < _scale.size(); scale++)
{
if (scale == 3 && _loadWorld)
@ -762,11 +759,8 @@ public class ItemMapManager extends MiniPlugin
colorWorldHeight(scale, startingX, startingZ);
}
TimingManager.stop("renderMap.scale loop");
TimingManager.start("renderMap.colorWorldHeight 0");
colorWorldHeight(0, startingX, startingZ);
TimingManager.stop("renderMap.colorWorldHeight 0");
}
public void scanWorldMap(int startingX, int startingZ, boolean setColors)

View File

@ -146,5 +146,6 @@ public class Recall extends Skill
public void Reset(Player player)
{
_locMap.remove(player);
_healthMap.remove(player);
}
}