RFR 8220238 : Enhancing j.l.Runtime/System::gc specification with an explicit 'no guarantee' statement
Roger.Riggs at oracle.com
Tue May 28 17:58:53 UTC 2019
Please review a change to the javadoc of Runtime.gc() and System.gc() to
that invoking these methods does not guarantee any specific result or
The revised text is:
* Runs the garbage collector in the Java Virtual Machine.
* Calling this method suggests that the Java Virtual Machine
* expend effort toward recycling unused objects in order to
* make the memory they currently occupy available for reuse
* by the Java Virtual Machine.
* 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.
Please review and comment, Roger
More information about the core-libs-dev