Skip to content

Conversation

@NoahvdAa
Copy link
Contributor

As explained on Discord:
The YAML configuration loader uses a unique threadlocal per loader instance. This leads to the Yaml instances sitting around for as long as the thread lives, even if the yaml config loader is no longer used or even gc'd.
This PR fixes that issue by moving away from a thread local and just creating the Yaml instance when we need it.

@zml2008 zml2008 self-assigned this Apr 20, 2025
@zml2008 zml2008 added this to the 4.3.0 milestone Apr 20, 2025
@zml2008 zml2008 enabled auto-merge April 20, 2025 20:49
@zml2008 zml2008 force-pushed the fix/threadlocal-memory-leak branch from 3a2128d to e5d0211 Compare April 20, 2025 21:04
@zml2008 zml2008 added this pull request to the merge queue Jun 1, 2025
Merged via the queue into SpongePowered:trunk with commit 27f0ac8 Jun 1, 2025
2 checks passed
PimvanderLoos pushed a commit to PimvanderLoos/Configurate that referenced this pull request Jul 5, 2025
…red#565)

* fix: threadlocal memory leak in yaml configuration loader

* chore(yaml): resolve style violations

---------

Co-authored-by: zml <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants