WeakRef

An object that holds a weak reference to another object; deref() returns the object, or undefined once it has been collected.

In more detail

Useful for caches of large objects that may be rebuilt. Collection timing is unpredictable, so never rely on it for program logic.

Related terms

Taught in

References