Disposable mixin

A mixin that marks an object as having resources that need to be cleaned up.

Implementing Disposable signals that an object has a dispose method which should be called to release resources like stream subscriptions or close connections, preparing the object for garbage collection.

Mixin applications
Available extensions

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Releases resources used by the object.
disposeWith(DisposeObserver observer) → void

Available on Disposable, provided by the DisposableExt extension

Register for dispose with given observer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited