-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Transient "disposable" services language #31726
Comments
As per my understanding the disposability brings much more pain than just plain transient service:
I believe regular (non-disposable) transient services are not tracked by the DI container; they get garbage collected. Is there a specific behavior of transient disposables in Blazor so that we want to emphasize the need to avoid them? |
Indeed! I see now why Javier was so specific in his choice of words, i.e., "transient disposables" ...
So, I'll revise the language to include additional explanation, and I can cross-link that PU issue, which explains this out in detail and the possible design under consideration for .NET 9. |
Description
Per discussion with @hakenr at #31705 (comment), make further updates to the lead-in remarks of the
OwningComponentBase
coverage ...https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/dependency-injection?view=aspnetcore-8.0#utility-base-component-classes-to-manage-a-di-scope
Perhaps, add additional remarks to explain what is meant by "disposables." I can add a cross-link to the PU issue that @hakenr found.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/dependency-injection?view=aspnetcore-8.0#utility-base-component-classes-to-manage-a-di-scope
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/fundamentals/dependency-injection.md
Document ID
d9aabe95-69e9-0a03-81ff-429914137f9d
Article author
@guardrex
The text was updated successfully, but these errors were encountered: