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

Andrew Haley aph at redhat.com
Tue Aug 3 09:06:14 UTC 2021

On 8/3/21 12:27 AM, Hans Boehm wrote:
> So my concern is really how to do (2) and (3) in the new world, i.e. wait
> until unreachable objects found by the last GC have been cleaned. With
> finalizers, System.runFinalization() effectively did the equivalent of that
> (potentially modulo the deadlock questions).

I did once manage to solve the problem of running out of native resources
by, instead of using a small object as a handle to the native resource,
using a multi-megabyte thought of it as being like attaching a brick to that
key people keep losing.

Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the jdk-dev mailing list