DisposableValue<T> class

Manages disposal of DisposableValue instances by tracking values in a map, with disposal and check methods.

Constructors

DisposableValue.new(T value)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
no setter
pass DisposableValue<T>
Returns a new instance of the same type with the same internal key value, but without any finalizer or weak reference attached to it.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
getter/setter pair

Methods

dispose([bool garbageCollect = false]) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
passAs<C>() DisposableValue<C>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

garbageCollect() → void
Removes any weak references to disposed AutoDisposableValue instances from the internal weak reference set and disposes of their associated values in the internal value map.