.NET analyzers complain about the Dispose method in Blazor Component #28952
Unanswered
TanvirArjel
asked this question in
Q&A
Replies: 1 comment
-
For the .NET vision, every Blazor component inherits from ComponentBase, and ComponentBase doesn't have a destructor, with this information I think you can safely call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ASP.NET Core Blazor team suggested
Dispose
method in a Blazor Component is as follows:The above code throws the following warnings:
If I write the
Dispose
method as follows then the warnings go away:My question is: Is it worthwhile calling
GC.SuppressFinalize(this);
in Blazor Component?Beta Was this translation helpful? Give feedback.
All reactions