IDisposable
The interface for objects that hold something you must give back, like an open file.
IDisposable declares Dispose(), which releases unmanaged or scarce resources deterministically rather than waiting for the garbage collector.
Examples
sealed class ReportWriter : IDisposablewhoseDispose()disposes theStreamWriterit created.
See also