disposables library

A small library to handle classes needing to release it's resources.

Classes

Disposable
Represents an object able to release it's resources.
DisposableCollection<D extends Disposable>
Represents a collection
DisposableMixin
Helper mixin to abstract away the isDisposed logic.

Functions

using<D extends Disposable>(Disposable disposable, DisposableBlock<Disposable> block) → void
Use a Disposable and dispose of it right away.

Typedefs

DisposableBlock<D extends Disposable> = void Function(D disposable)
Callback used in the using method.
DisposeFunc = void Function()
The callback to use when disposing the Disposable.

Exceptions / Errors

DisposableException