Main Page | Class Hierarchy | Class List | Directories | Class Members | Related Pages

java.lang.ref.SoftReference Class Reference

Inheritance diagram for java.lang.ref.SoftReference:

java.lang.ref.Reference java.lang.Object List of all members.

Detailed Description

SoftReference objects are used to detect referents which are no longer visible and who's memory is to be reclaimed.

Since:
JDK1.2


Public Member Functions

 SoftReference (Object r, ReferenceQueue q)
 Constructs a new instance of this class.
 SoftReference (Object r)
 Constructs a new instance of this class.
Object get ()
 Return the referent of the reference object.

Private Attributes

int age


Constructor & Destructor Documentation

java.lang.ref.SoftReference.SoftReference Object  r,
ReferenceQueue  q
 

Constructs a new instance of this class.

Parameters:
r referent to track.
q queue to register to the reference object with.

java.lang.ref.SoftReference.SoftReference Object  r  ) 
 

Constructs a new instance of this class.

Parameters:
r referent to track.


Member Function Documentation

Object java.lang.ref.SoftReference.get  ) 
 

Return the referent of the reference object.

Returns:
Object Referent to which reference refers, or null if object has been cleared.

Reimplemented from java.lang.ref.Reference.


The documentation for this class was generated from the following file:
(c) Copyright 2005 The Apache Software Foundation or its licensors, as applicable.