Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.21 Fabric] Make hideModName cache use weak references #558

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

Ampflower
Copy link
Contributor

Minimises the window where the tooltip can end up leaking large objects.

This isn't strictly necessary, but it helps when you're playing with mods that end up inflating the context by a lot by storing a world or so in it.

This is applicable for, frankly all versions this cache exists.

Another route would be making a WeakHashSet given all this is used for is whether the item should have the mod name added to its tooltip.

Minimises the window where the tooltip can end up leaking large objects.
@Snownee Snownee merged commit 86d43c1 into Snownee:1.21-fabric Feb 28, 2025
@Snownee
Copy link
Owner

Snownee commented Feb 28, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants