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

Going back to custom uk.org.lidalia.lang.ThreadLocal in some classes #257

Merged

Conversation

sofiamorseletto
Copy link

Going back to the custom ThreadLocal implementation (uk.org.lidalia.lang.ThreadLocal) in order to prevent memory leaks.

The classes in which the custom ThreadLocal should be used are TestLogger and TestLoggerFactory which hold the loggingEvents attribute that contains LoggingEvent instances. On TestMDCAdapter it's not necessary since the ThreadLocal attribute (value) contains a Map of String keys and values, not LoggingEvents.

As requested by @valfirst, in order not to add an extra dependency, I'm copying the original implementation from https://github.com/Mahoney/lidalia-lang giving credit to the author in the comments.

Closes #255

@codeclimate
Copy link

codeclimate bot commented Mar 29, 2022

Code Climate has analyzed commit ce301e9 and detected 0 issues on this pull request.

View more on Code Climate.

@valfirst valfirst merged commit 817aeda into valfirst:master Mar 29, 2022
@sofiamorseletto sofiamorseletto deleted the fix/back-to-custom-threadlocal branch March 29, 2022 17:27
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.

Memory leak when clearing logs in all threads
2 participants