← back to index

S3971 — "GC.SuppressFinalize" should not be called

Language: C#  |  Type: CODE_SMELL  |  Severity: Major

Why is this an issue?

GC.SuppressFinalize requests that the system not call the finalizer for the specified object. This should only be done when implementing Dispose as part of the Dispose Pattern.

This rule raises an issue when GC.SuppressFinalize is called outside that pattern.