Memory leak in ModelTrough
tterrag1098 opened this issue ยท 3 comments
Expected Behavior
ModelTrough should not be creating a new ModelRenderer
every frame
Actual Behavior
It does, here: https://github.com/capnkirok/animaniamod/blob/1.12/src/main/java/com/animania/client/models/ModelTrough.java#L195
This causes ModelBase#boxList to balloon in size and memory usage:
Steps to Reproduce
Place down a trough, fill it with water
Version of Minecraft, version of Animania, Single Player or Server
MC 1.12.2
Animania 1.4.7
Server, but irrelevant to the issue.
Screenshots encouraged
See above
Oh my god, 7 likes on one issue before I even read it. And not only did you clearly explain the issue, you also provided the exact line in the code where the problem occurs. Thank you!
Here I was testing the Tile Entity, thinking the memory leak was there.
Yes, this was implemented incorrectly. Will update asap. (FYI, @Tschipp)
Ok, this is fixed in dev. Will push in a couple of days after I scoop up a few more. Thanks!