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

Fix block entity memory leak (API 9) #3813

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

Lignium
Copy link
Contributor

@Lignium Lignium commented Jan 11, 2023

Adaptation of my early PR #3689 for api-8. In version 1.18.2, the associated code has changed slightly, leaving only one field with a collection of ticking block entities. The code is tested, the leak is gone.

@aromaa aromaa self-assigned this Jan 13, 2023
@aromaa
Copy link
Member

aromaa commented Jan 13, 2023

This can only happen when a plugin manipulates the chunks while the world is seen as empty? Which would mean this can't be reported to Mojang directly to get this fixed? Could you add more details to the comment so this is not overlooked when porting to the newer versions of Minecraft.

@Lignium Lignium force-pushed the fix/block-entity-memory-leak branch from 674207e to 3918823 Compare January 13, 2023 16:09
@Lignium
Copy link
Contributor Author

Lignium commented Jan 13, 2023

@aromaa Quite right. I have added some comments.

Copy link
Member

@aromaa aromaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

…el/ServerLevelMixin.java

Co-authored-by: Joni Aromaa <me@joniaromaa.fi>
@Lignium Lignium requested a review from aromaa January 13, 2023 17:28
Copy link
Member

@aromaa aromaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@aromaa aromaa merged commit 02d449c into SpongePowered:api-9 Jan 13, 2023
@Lignium Lignium deleted the fix/block-entity-memory-leak branch January 21, 2023 15:43
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.

None yet

2 participants