Skip to content

Make DefaultActionDescriptorCollectionProvider implement IDisposable#66426

Open
kvantetore wants to merge 2 commits intodotnet:mainfrom
kvantetore:fix/disposable-defaultactiondescriptorcollectionprovider
Open

Make DefaultActionDescriptorCollectionProvider implement IDisposable#66426
kvantetore wants to merge 2 commits intodotnet:mainfrom
kvantetore:fix/disposable-defaultactiondescriptorcollectionprovider

Conversation

@kvantetore
Copy link
Copy Markdown

@kvantetore kvantetore commented Apr 22, 2026

Make DefaultActionDescriptorCollectionProvider implement IDisposable

Make DefaultActionDescriptorCollectionProvider implement IDisposable and disconnect from the supplied actionDescriptorChangeProviders when disposed.

Description

The fix follows the implementation of ActionEndpointDataSourceBase, and is fairly straight forward. I have updated the tests where it makes sense to dispose of the DefaultActionDescriptorCollectionProvider directly. However, I don't think it's important to do the disposing in the tests, so this could possibly be dropped.

Fixes #66425

…and disconnect from the supplied actionDescriptorChangeProviders when disposed
@kvantetore kvantetore requested a review from a team as a code owner April 22, 2026 21:37
@github-actions github-actions Bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Apr 22, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Apr 22, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Thanks for your PR, @kvantetore. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@kvantetore
Copy link
Copy Markdown
Author

kvantetore commented Apr 22, 2026

@dotnet-policy-service agree company="Norbits"

1 similar comment
@kvantetore
Copy link
Copy Markdown
Author

@dotnet-policy-service agree company="Norbits"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DefaultActionDescriptorCollectionProvider never disposes the handle returned by ChangeToken.Change(...)

1 participant