ResourceHandle<V> class final

A borrowed reference to a cached resource.

Holding a handle keeps the resource in the cache; release gives it back. Handles rather than raw values because "who still needs this" is the only question a cache cannot answer on its own.

Properties

hashCode int
The hash code for this object.
no setterinherited
isReleased bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → V
The cached resource. Reading it after release is a bug.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() → void
Returns the reference.
toString() String
A string representation of this object.
inherited

Operators

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