GenericReference<T extends Object> class abstract

Represents a generic reference wrapper that may hold either a strong or weak reference to a target object.

Implementations can dynamically control whether the referenced object is retained strongly (preventing garbage collection) or weakly (allowing it to be collected).

See LazyWeakReference.

Constructors

GenericReference()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isStrong → bool
Whether this currently holds a strong reference.
no setter
isWeak → bool
Whether this reference is marked as weak (not strong). See isStrong.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → T?
Returns the target object.
no setter
targetIfStrong → T?
Returns the object only if currently held strongly. See target, isStrong.
no setter

Methods

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