WeakReference<T extends Object> constructor Null safety

WeakReference<T extends Object>(
  1. T target
)

Creates a WeakReference pointing to the given target.

The target must be an object supported as an Expando key, which means target cannot be a number, a string, a boolean, the null value, or certain other types of special objects.

Implementation

external factory WeakReference(T target);