On Wed, 11 Nov 2020 18:13:30 GMT, Albert Mingkun Yang wrote:
> With `getInactive`, is the null check, `if (finalizee != null` still needed?
Good point! I don't think it is. The GC should not clean the referent before we
finalized it (or not at all), and no other code is clearing it either.
On Wed, 11 Nov 2020 18:19:01 GMT, Mandy Chung wrote:
>> Roman Kennke has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Rename inactive-getter and improve javadocs
>
> src/java.base/share/classes/java/lang/ref/Reference.java line 356:
>
On Wed, 11 Nov 2020 17:48:12 GMT, Roman Kennke wrote:
>> Finalizer calls Reference.get() from the Finalizer to acquire the finalizee.
>> Concurrent reference processing GCs like Shenandoah and ZGC would return
>> NULL for unreachable referents, and thus would not call finalize() on them.
>>
On Wed, 11 Nov 2020 18:04:12 GMT, Erik Ă–sterlund wrote:
>> Roman Kennke has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Rename inactive-getter and improve javadocs
>
> Looks good.
With `getInactive`, is the null check, `if (finalizee
On Wed, 11 Nov 2020 17:48:12 GMT, Roman Kennke wrote:
>> Finalizer calls Reference.get() from the Finalizer to acquire the finalizee.
>> Concurrent reference processing GCs like Shenandoah and ZGC would return
>> NULL for unreachable referents, and thus would not call finalize() on them.
>>
> Finalizer calls Reference.get() from the Finalizer to acquire the finalizee.
> Concurrent reference processing GCs like Shenandoah and ZGC would return NULL
> for unreachable referents, and thus would not call finalize() on them.
>
> ZGC works around this by fixing the referent before