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

prevent potential ThreadLocal memory leaks #2320

Merged
merged 1 commit into from Jan 10, 2024
Merged

Conversation

TechLord22
Copy link
Member

What

Uses ThreadLocal#remove instead of set(null), which fully disassociates the threadlocal with the current thread. Using set(null) keeps the association, which can cause memory leaks.

Outcome

Prevents potential memory leaks due to not removing from ThreadLocals.

@TechLord22 TechLord22 requested a review from a team as a code owner December 26, 2023 18:20
@TechLord22 TechLord22 added the type: bug Something isn't working label Dec 26, 2023
Copy link
Contributor

@ALongStringOfNumbers ALongStringOfNumbers left a comment

Choose a reason for hiding this comment

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

Sure why not

@TechLord22 TechLord22 merged commit 588695e into master Jan 10, 2024
4 of 5 checks passed
@TechLord22 TechLord22 deleted the tc-fix-threadlocal branch January 10, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants