Product SiteDocumentation Site

5.4.22. The WeakReference Class

A WeakReference instance maintains a non-pinning reference to another object. A non-pinning reference does not prevent an object from getting garbage collected or having its uninit method run when there are no longer normal references maintained to the object. Once the referenced object is eligible for garbage collection, the reference inside the WeakReference instance will be cleared and the VALUE method will return .nil on all subsequent calls. WeakReferences are useful for maintaining caches of objects without preventing the objects from being reclaimed by the garbage collector when needed.

Table 5.49. ooRexx WeakReference Class

Object
WeakReference
new
value

Note

The WeakReference class also has available class methods that its metaclass, the Class class (Section 5.1.2, “The Class Class”), defines.

5.4.22.1. Inherited Methods

Methods inherited from the Object class (Section 5.1.1, “The Object Class”).
new (Class Method)initsend
= \= == \== <> ><instanceMethodsendWith
|| '' (abuttal)' ' (blank)instanceMethodssetMethod
(Operator Methods)isAstart
classisInstanceOfstartWith
copyobjectNamestring
defaultNameobjectName=unsetMethod
hasMethodrequest 
identityHashrun