Metallurgy 4: Reforged

Metallurgy 4: Reforged

438k Downloads

Memory leak in EventUtils

LemADEC opened this issue ยท 1 comments

commented

General Information

Describe the bug:
A new ArrayList is created for every player every tick

List<ItemStack> list = Lists.newArrayList(pl.getArmorInventoryList().iterator());

From a quick check, this is doubled depending on OsmiumLutetium availability?

To Reproduce:
Profiling & Code review

Expected behavior:
Avoid memory allocation in event handlers.


Environment Versions

Versions:


Logging Information

Crash Report (if available):
n/a

Latest Log (if necessary):
n/a


Additional Information

Screenshots (if available):
n/a

Additional context (optional):
n/a

commented

oof, that code has been there for quite a while, thanks for reporting it