docs icon indicating copy to clipboard operation
docs copied to clipboard

Cleanup of managed resources in the finalizer?

Open berrs opened this issue 3 years ago • 0 comments

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.

berrs avatar Sep 15 '22 14:09 berrs