mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8225667: Clarify the behavior of System::gc w.r.t. reference processing
Reviewed-by: rriggs, kbarrett, tschatzl
This commit is contained in:
parent
2b20778225
commit
3a69024033
@ -655,6 +655,10 @@ public class Runtime {
|
||||
* 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 name {@code gc} stands for "garbage
|
||||
* collector". The Java Virtual Machine performs this recycling
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user