Package com.ms.vm |
![]() Previous |
![]() Contents |
![]() Index |
public class WeakReference { // Constructors public WeakReference(Object referent) // Methods public synchronized Object getReferent() public synchronized void finalize() }
Implements a weak reference to an object. A weak reference tracks an object without preventing it from being garbage collected.
public WeakReference(Object referent)Constructs a weak reference to a specified object.
Parameter Description referent the object to track
public synchronized void finalize()Finalizes the weak reference instance. The referent is no longer tracked.
public synchronized Object getReferent()Returns the current object being tracked.
Return Value:
Returns the object being tracked or null if the object was collected.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.