C#


ROSLYN.USAGE.CA2216 : Disposable types should declare finalizer (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

A type that implements System.IDisposable and has fields that suggest the use of unmanaged resources does not implement a finalizer, as described by Object.Finalize.

This check corresponds to Roslyn rule CA2216. For full rule details, see the Microsoft website: CA2216.

Properties

Class Name Disposable types should declare finalizer (C#)
Significance reliability
Mnemonic ROSLYN.USAGE.CA2216
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Disposable types should declare finalizer (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.