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

SF Provider: memory leak: Create a new scope in HTTP controller DI on each BeginScope call #933

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

NeetArt
Copy link
Member

@NeetArt NeetArt commented Aug 3, 2023

Create a new scope in HTTP controller dependency injection on each BeginScope call

Previous implementation used a single root scope for all HTTP requests. As the scope was never disposed, so didn't the controller & HTTP request/response objects, causing them to get accumulated in memory.
This change creates a new scope in BeginScope() API which will be disposed by request handler when the request completes. More information can be found here: Dependency Injection in ASP.NET Web API 2 - ASP.NET 4.x | Microsoft Learn

@shankarsama shankarsama merged commit e824412 into Azure:main Aug 3, 2023
1 check passed
nytian pushed a commit that referenced this pull request Aug 16, 2023
* SF Provider: memory leak: Create a new scope in HTTP controller DI on each BeginScope call (#933)

* SF Provider: memory leak: Create a new scope in HTTP controller DI on every BeginScope call

* Bump up package version

---------

Co-authored-by: Abhineet Garg <abhigarg@microsoft.com>

* Update SDK versions

* Use Uri property

* Update table sdk again

---------

Co-authored-by: NeetArt <20233106+NeetArt@users.noreply.github.com>
Co-authored-by: Abhineet Garg <abhigarg@microsoft.com>
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

2 participants