Fate of {System|Runtime}.runFinalization (Re: Ad removing finalize eventually

Rony G. Flatscher Rony.Flatscher at wu.ac.at
Mon Aug 2 13:12:17 UTC 2021

On 01.08.2021 21:02, Alan Bateman wrote:
> On 01/08/2021 14:01, Rony G. Flatscher wrote:
>> Maybe a last question in this context: is it planned that
>> {System|Runtime.getRuntime()}.runFinalization() gets removed when finalize() gets removed? If so,
>> would there be an equivalent?
> There isn't a proposal or JEP yet for the next steps for finalization. The runFinalization method
> should probably be deprecated. It might be that the method is eventually "degraded" to do nothing
> or throw an exception, too early to say. Aside from System.gc, there isn't an API exposed to
> "help" reference processing.

Thank you very much for clarifying, so it is safest to remove its usage!


More information about the jdk-dev mailing list