Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit


Sets the value used by the garbage collector to determine the number of garbage collection (GC) cycles after which a soft reference is cleared if its referent has not been marked.



Default behavior

The default value is 32.

This option can be used with all Eclipse OpenJ9™ GC policies.


A soft reference (where its referent is not marked) is cleared after a number of GC cycles, which is calculated as: <value> * (proportion of free heap space)

For example, if -Xsoftrefthreshold is set to 32, and the heap is 25% free, soft references are cleared after 8 GC cycles.