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 memory leak due to use of ConcurrentBag #1257

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

alistairjevans
Copy link
Member

Ensure we empty the _registrations bag in DefaultRegisteredServicesTracker when we dispose the tracker; this ensures any ThreadLocal references are cleared up and memory is not leaked.

Fixes #1252

…ring we empty the bag when we're done with it.
@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #1257 (937f0ab) into develop (3ca27f8) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1257      +/-   ##
===========================================
+ Coverage    76.34%   76.38%   +0.03%     
===========================================
  Files          185      187       +2     
  Lines         4870     5085     +215     
  Branches      1004     1034      +30     
===========================================
+ Hits          3718     3884     +166     
- Misses         679      707      +28     
- Partials       473      494      +21     
Impacted Files Coverage Δ
...e/Registration/DefaultRegisteredServicesTracker.cs 83.84% <100.00%> (+0.12%) ⬆️
src/Autofac/Features/Metadata/Meta{T,TMetadata}.cs 100.00% <0.00%> (ø)
...ilder{TLimit,TActivatorData,TRegistrationStyle}.cs 76.44% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ca27f8...ba23a02. Read the comment docs.

Copy link
Member

@tillig tillig left a comment

Choose a reason for hiding this comment

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

🔢

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.

OnActivated leaks memory
3 participants