8225667: Clarify the behavior of System::gc w.r.t. reference processing

Reviewed-by: rriggs, kbarrett, tschatzl
This commit is contained in:
Mandy Chung 2021-07-06 14:59:42 +00:00
parent 2b20778225
commit 3a69024033
2 changed files with 9 additions and 0 deletions

View file

@ -1872,6 +1872,11 @@ public final class System {
* There is no guarantee that this effort will recycle any particular
* number of unused objects, reclaim any particular amount of space, or
* complete at any particular time, if at all, before the method returns or ever.
* There is also no guarantee that this effort will determine
* the change of reachability in any particular number of objects,
* or that any particular number of {@link java.lang.ref.Reference Reference}
* objects will be cleared and enqueued.
*
* <p>
* The call {@code System.gc()} is effectively equivalent to the
* call: