iron431 / irons-spells-n-spellbooks

Other
77 stars 60 forks source link

[Bug] Memory Leak of Server Player on death #555

Closed pietro-lopes closed 2 months ago

pietro-lopes commented 2 months ago

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.

https://github.com/iron431/irons-spells-n-spellbooks/blob/f0450282d0466883a064996b88805d0e2344c92a/src/main/java/io/redspace/ironsspellbooks/player/ServerPlayerEvents.java#L283-L285

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

iron431 commented 2 months ago

fixed in 3.4.5