Big tree generator causes memory leak
Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) which does not generate big trees has still a reference to the previously loaded world and prevents the garbage collection from collecting it.
Created Issue:
Big tree generator causes memory leak
Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) that does not generate big trees keeps the last world open and prevents the garbage collection from collection it.
Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen)
thatdoes not generate big trees keeps the last world open and prevents the garbage collection from collection it.Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) which does not generate big trees keeps the last world open and prevents the garbage collection from collection it.
Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) which does not generate big trees
keeps the lastworldopenand prevents the garbage collection from collection it.Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) which does not generate big trees has still a reference to the previously loaded world and prevents the garbage collection from collection it.
Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) which does not generate big trees has still a reference to the previously loaded world and prevents the garbage collection from collecti
on it.Note
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The bug
The method net.minecraft.world.gen.feature.WorldGenBigTree.generate(World, Random, BlockPos) sets the given world as value for the net.minecraft.world.gen.feature.WorldGenBigTree.world field. The problem is that after generating or not generating the tree the field is not set to null again. Because each biome has a WorldGenBigTree constant and the biomes are created once on startup of the game, a different world (or the title screen) which does not generate big trees has still a reference to the previously loaded world and prevents the garbage collection from collecting it.
Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w43a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.
Should still be the case in 1.10, but I don't have a good map to test it right now