Mo' Bends

Mo' Bends

29M Downloads

(1.12) Memory Leak: KumoVariableRegistry#tempData

Meldexun opened this issue ยท 0 comments

commented

Describe the bug
I'm don't fully understand what kumo variables are but from looking at it the tempData field seems to be used when an entity with Mo'Bends animations is rendered. This means the variable gets frequently updated and there shouldn't be a memory leak normally.

But what if I join a world and an entity with Mo'Bends animations gets rendered. After that I leave the world and I join another world where no entity with Mo'Bends animations exists. This means the tempData field still holds the value from the last rendered entity which causes that entity and its world to not be garbage collected.

To Reproduce
Steps to reproduce the behavior:

  1. Join a world
  2. Let an entity with Mo'Bends animations be rendered
  3. Leave the world
  4. Join a world without any entity with Mo'Bends animations
  5. See a WorldClient instance not being garbage collected

Context (please complete the following information):

  • Minecraft version: 1.12.2
  • Forge version: 14.23.5.2855
  • Mo' Bends version: 1.1.0