Primitive Mobs

Primitive Mobs

10M Downloads

WorldClient leaked by static reference in PrimitiveMobsParticles

mjdg opened this issue ยท 2 comments

commented

The static initializer for PrimitiveMobsParticles caches a reference to the current WorldClient which is never released, leaking memory. Steps to reproduce:

  1. create a single-player world
  2. spawn a TreasureSlime to make sure the static initializer is called (I think - my Java ain't too good!)
  3. quit to main menu
  4. reload the save from step 1

Examining the heap e.g. with VisualVM shows two WorldClient objects, the second of which is referenced by the Minecraft object and the first by PrimitiveMobParticles.theWorld.

commented

Nice catch thats quite old stuff. Will fix

commented

Fixed in next version