Easy Villagers

Easy Villagers

28M Downloads

Memory Leak of Client Level

pietro-lopes opened this issue ยท 2 comments

commented

Bug description

This cache is leaking the level

image

Minecraft version

1.21.1

Mod version

1.21.1-1.1.19

Mod loader and version

NeoForge 21.1.28

Steps to reproduce

With EMI installed

  1. Join world
  2. Do some search on EMI
  3. Leave world to main screen
  4. Join world again
  5. Check memory for some hanging ClientLevel

Expected behavior

Should have a cleanup strategy to clear those cache on LevelEvent.Unload, maybe? Pick what you know it is best.

Log files

screenshot posted

Screenshots

No response

commented

Also, some renderers are holding entity, you need to find a way to clean up if the level is unloaded.

commented

Thank you for bringing this to my attention!
I think I've fixed all the leaks by using weak references. Please let me know if you find anything else.