Remove unnecessary Dispose Override from BackgroundWorker#52504
Remove unnecessary Dispose Override from BackgroundWorker#52504johnthcall wants to merge 1 commit intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @safern Issue DetailsAs part of #43852 this Dispose was missing documentation, however as this is the same as the Dispose(boolean) of Component base class removing this should cause the documentation to be inherited just like Dispose() and GetService(Type) is.
|
|
Component.Dispose(bool) removes the component from its container, and raises the Disposed event: BackgroundWorker.Dispose(bool disposing) neither calls base.Dispose(disposing) nor does the same things on its own. If you remove that override, then those things will happen when a BackgroundWorker is disposed. Which may be an improvement but anyway increases the risk from the change. The empty BackgroundWorker.Dispose(bool) method was changed from So, removing the override makes sense to me. However:
|
|
@KalleOlaviNiemitalo thanks for the catch, I had gone to definition of Component but was incorrectly looking at the Decompiled source where it showed no code in the Dispose method. |
As part of #43852 this Dispose was missing documentation, however as this is the same as the Dispose(boolean) of Component base class removing this should cause the documentation to be inherited just like Dispose() and GetService(Type) is.