-
Bug
-
Resolution: Fixed
-
P3
-
13
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8225984 | 14 | Roger Riggs | P3 | Resolved | Fixed | team |
Current specifications for the following methods:
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#gc()
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#gc()
might give a false impression that garbage collection is guaranteed to happen eventually.
However garbage collection may never ever happen. It would be beneficial to add an explicit mention of this fact as some kind of a disclaimer, like the following:
- "Please note that implementation of this method does not guarantee that garbage collection will be ever started"
or
- "Implementation of this method is allowed to not implement or trigger any memory reclamation mechanism"
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#gc()
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#gc()
might give a false impression that garbage collection is guaranteed to happen eventually.
However garbage collection may never ever happen. It would be beneficial to add an explicit mention of this fact as some kind of a disclaimer, like the following:
- "Please note that implementation of this method does not guarantee that garbage collection will be ever started"
or
- "Implementation of this method is allowed to not implement or trigger any memory reclamation mechanism"
- backported by
-
JDK-8225984 Enhancing j.l.Runtime/System::gc specification with an explicit 'no guarantee' statement
-
- Resolved
-
- csr for
-
JDK-8224760 Enhancing j.l.Runtime/System::gc specification with an explicit 'no guarantee' statement
-
- Closed
-