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

[Question] Why HttpResponseMessage calls GC.SuppressFinalize if it doesn't have a finalizer? #43133

Closed
Kamil-Zakiev opened this issue Oct 7, 2020 · 3 comments
Labels
area-System.Net.Http question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@Kamil-Zakiev
Copy link

Hello,
Could you please clarify why HttpResponseMessage calls GC.SuppressFinalize during Dispose if the class doesn't have a finalizer?

As I understand, GC won't finilize an object that doesn't have a finalizer

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Oct 7, 2020
@ghost
Copy link

ghost commented Oct 7, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@gfoidl
Copy link
Member

gfoidl commented Oct 7, 2020

See #42183 for a discussion about this topic.

In essence it's about sub-classing and that a sub-class may have a finalizer.

@stephentoub stephentoub added question Answer questions and provide assistance, not an issue with source code or documentation. and removed untriaged New issue has not been triaged by the area owner labels Oct 7, 2020
@stephentoub
Copy link
Member

Closing as answered. Thanks.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

5 participants