Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

18M Downloads

[Bug] Memory Leak of Server Player on death

pietro-lopes opened this issue ยท 1 comments

commented

Observed behaviour

Here is when SyncedSpellData is passed to new MagicData, but SyncedSpellData contains livingEntity, which (as it came from old) still refers to dead player, causing it to leak.

MagicData oldMagicData = MagicData.getPlayerMagicData(event.getOriginal());
MagicData newMagicData = MagicData.getPlayerMagicData(event.getEntity());
newMagicData.setSyncedData(oldMagicData.getSyncedData());

Expected behaviour

No leak

Steps to reproduce

Login,
/kill @s
check objects

Server Type

Single Player

Crashlog

No response

Iron's Spells N Spellbooks version

3.4.4

Forge version

21.1.12

Other mods

No response

commented

fixed in 3.4.5