IDisposable

The .NET interface with a single Dispose method, implemented by types that own something the garbage collector cannot clean up, such as a file, socket or database connection.

In more detail

Whoever creates a disposable object is responsible for disposing it. For objects the dependency injection container creates, the container disposes them when their scope ends.

Related terms

Taught in

References