Quirrel4.53.0

weakref

Methods on every weak reference.

Functions

clonenodiscard clone(): anyReturns this weakref.
constructorconstructor(obj): anyReturns a weak reference to obj. This is what runs when types.WeakRef itself is called, types.WeakRef(obj) - the same conversion obj.weakref() performs as a method.
refnodiscard weakref.ref(): anyReturns the value this weakref points at, or null once that value is gone.
tostringnodiscard tostring(): anyReturns a string naming the type and identity of this weakref object itself - not of the value it points at.
weakrefnodiscard weakref(): anyReturns a weak reference to this weakref.