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 regression #1353

Merged
merged 1 commit into from
Oct 25, 2022
Merged

Fix memory leak regression #1353

merged 1 commit into from
Oct 25, 2022

Conversation

botinko
Copy link
Contributor

@botinko botinko commented Oct 25, 2022

Fix memory leak due to use of ConcurrentBag for registrations by ensuring we empty the bag when we're done with it.

Bug was fixed in #1257
AsyncDispose was not aware of this issue.

image

…ncurrentBag for registrations by ensuring we empty the bag when we're done with it.
@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Base: 77.98% // Head: 77.96% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (885ed44) compared to base (0362f7e).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1353      +/-   ##
===========================================
- Coverage    77.98%   77.96%   -0.03%     
===========================================
  Files          195      195              
  Lines         5587     5590       +3     
  Branches      1119     1119              
===========================================
+ Hits          4357     4358       +1     
- Misses         716      717       +1     
- Partials       514      515       +1     
Impacted Files Coverage Δ
...e/Registration/DefaultRegisteredServicesTracker.cs 84.67% <100.00%> (+0.34%) ⬆️
src/Autofac/Util/SequenceGenerator.cs 71.42% <0.00%> (-28.58%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@alistairjevans alistairjevans left a comment

Choose a reason for hiding this comment

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

Aaargh, good catch! Thanks for the change. 👍

@alistairjevans alistairjevans merged commit 58e297d into autofac:develop Oct 25, 2022
@botinko
Copy link
Contributor Author

botinko commented Oct 25, 2022

@alistairjevans Sure. Is it possible to make a new release with this fix?

@srogovtsev
Copy link

srogovtsev commented Nov 15, 2022

This seems to have a drastic effect combined with autofac/Autofac.Owin#29: I am investigating a very sizeable memory leak after upgrading to Autofac.Owin 7.0.0, and the symptoms all match.

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

3 participants