Packagesystem.data
Classpublic class WeakReference
InheritanceWeakReference Inheritance Object

A weak reference is a reference that does not protect the referent object from collection by a garbage collector. An object referenced only by weak references is considered unreachable (or "weakly reachable") and so may be collected at any time. Weak references are used to prevent circular references and to avoid keeping in memory referenced by unneeded objects.



Public Properties
 PropertyDefined By
  value : *
The value of the weak reference.
WeakReference
Public Methods
 MethodDefined By
  
WeakReference(value:* = null)
Create a new WeakReference instance.
WeakReference
  
dispose():void
Dispose the reference.
WeakReference
  
toString():String
Returns a String representation of the object.
WeakReference
Property Detail
valueproperty
value:*

The value of the weak reference.


Implementation
    public function get value():*
    public function set value(value:any):void
Constructor Detail
WeakReference()Constructor
public function WeakReference(value:* = null)

Create a new WeakReference instance.

Parameters
value:* (default = null) — The value of the weak reference.
Method Detail
dispose()method
public function dispose():void

Dispose the reference.

toString()method 
public function toString():String

Returns a String representation of the object.

Returns
String — a String representation of the object.