MoBends icon indicating copy to clipboard operation
MoBends copied to clipboard

(1.12) Memory Leak: PlayerPreviewer#PREVIEW_DATA

Open Meldexun opened this issue 4 years ago • 1 comments

Describe the bug When the player joins a world a PlayerData instance will be assigned to the PREVIEW_DATA field. This field will never be updated and thus the first player entity instance and its world will stay in memory for ever.

https://github.com/mobends/MoBends/blob/3b56b02e59fcf2d8571d3fedb6ceee8f8824ba05/src/main/java/goblinbob/mobends/standard/previewer/PlayerPreviewer.java#L9

To Reproduce Steps to reproduce the behavior:

  1. Join world
  2. Leave world
  3. See 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

Meldexun avatar Dec 21 '21 01:12 Meldexun

Fixed in my fork

zOnlyKroks avatar Nov 23 '23 11:11 zOnlyKroks