Cold Sweat

Cold Sweat

3M Downloads

The method getTemperatureAt() in Temperature.java will cause memory leak

moguang2004 opened this issue ยท 1 comments

commented

I call this method in my mod to get the world temperature one time per tick and find the memory use will continuously increase. I guess is the dummy player that occupied the memory and didn't be released properly.
image

commented

I see. I'm not sure why that would be the case, because there should only be one per dimension ID. How do you know that this particular method is the one that causes the memory leak?

Some advice, as well, is that you likely don't need to run this every tick. Because getting the world temperature is a pretty complex operation, it would help performance if you made this check every 5, 10, or even 20 ticks