Closed LaserSlime closed 1 year ago
Thanks for the report. We do indeed cache worlds in sime way, I'll look into this when I get the change
@LaserSlime Could you elaborate on "a plugin to load/unload worlds"? What plugin could we reproduce the issue with?
It should happen with any plugin that uses Bukkit.unloadWorld. Maybe try Multiverse?
I've addressed this issue. The fix will be in the next release
Describe the bug The plugin somewhere keeps references to chunks or other elements of worlds even after they are unloaded using Bukkit.unloadWorld by other plugins.
To Reproduce Steps to reproduce the behavior:
Expected behavior If you repeat the same steps without VoxelSniper, this should not happen.
Screenshots
Desktop (please complete the following information):
Additional context I was told by the paper devs that unloadWorld memory leaks really only happen due to other plugins keeping references to chunks. When I removed all plugins except for one that unloads worlds and spark, it did indeed stop. So I added every single plugin back 1 by 1 and tested and as soon as I added VoxelSniper, I could see lots of ChunkTaskScheduler instances in the heap dump.