GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Memory leak on client disconnect

ViRb3 opened this issue ยท 0 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

1.2.2.a

Recipe Viewer Installed

JEI

Environment

Singleplayer

Cross-Mod Interaction

Yes

Other Installed Mods

JEI 15.3.0.4

Expected Behavior

Memory usage remains the same

Actual Behavior

The previous session's ClientLevel remains transiently held in LEVEL of com.gregtechceu.gtceu.api.gui.widget.PatternPreviewWidget, which causes a permanent RAM leak of up to 300MB on large modpacks. This doesn't seem to accumulate across multiple rejoins, it happens only after the first one, presumably because the oldest one gets cleaned, but it's still pretty bad as it leaves a permanent +300MB RAM increase. I'm not sure exactly how this class is used, otherwise I would have PR'd a fix. Maybe throw in a WeakReference in there?

Screenshot 2024-05-14 at 17 54 31

Steps to Reproduce

Log in, disconnect, log in

Additional Information

No response