Fixed memory leak in MarkedForDeath
This commit is contained in:
parent
7bdf5451d4
commit
513810caaa
@ -197,6 +197,30 @@ public class MarkedForDeath extends SkillActive
|
|||||||
if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround())
|
if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround())
|
||||||
arrowIterator.remove();
|
arrowIterator.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Iterator<Player> activeIterator = _active.iterator(); activeIterator.hasNext();)
|
||||||
|
{
|
||||||
|
Player player = activeIterator.next();
|
||||||
|
|
||||||
|
if (!player.isOnline())
|
||||||
|
activeIterator.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Iterator<LivingEntity> markedTimeIterator = _markedTime.keySet().iterator(); markedTimeIterator.hasNext();)
|
||||||
|
{
|
||||||
|
LivingEntity markedTime = markedTimeIterator.next();
|
||||||
|
|
||||||
|
if (markedTime.isDead() || !markedTime.isValid())
|
||||||
|
markedTimeIterator.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Iterator<LivingEntity> markedDamageIterator = _markedDamage.keySet().iterator(); markedDamageIterator.hasNext();)
|
||||||
|
{
|
||||||
|
LivingEntity markedDamage = markedDamageIterator.next();
|
||||||
|
|
||||||
|
if (markedDamage.isDead() || !markedDamage.isValid())
|
||||||
|
markedDamageIterator.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user