docs
docs copied to clipboard
Cleanup of managed resources in the finalizer?
Is it safe to access object members from a finalizer? I'm talking about normal managed members here, nothing unmanaged. The recommendation used to be that the finalizer should only touch unmanaged resources, since there was no guarantee that managed members were still alive at the time of finalization. However, this page does not mention that at all, so is that recommendation no longer necessesary? Because if it is, I definitely think the page should mention it.
Regards
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: a96eaef8-dcc9-4659-3f4e-be5a1c4c6b50
- Version Independent ID: d3da7981-542d-e906-5988-b80e403fa651
- Content: Finalizers - C# Programming Guide
- Content Source: docs/csharp/programming-guide/classes-and-structs/finalizers.md
- Product: dotnet-csharp
- Technology: csharp-fundamentals
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn