RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

Aleksey Shipilev shade at openjdk.org
Wed Jan 29 19:56:01 UTC 2025


On Wed, 29 Jan 2025 19:42:49 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/ref/Reference.java line 282:
>> 
>>> 280:      * This method returns a strong reference to the referent. This may cause
>>> 281:      * the garbage collector to treat it as strongly reachable until some later
>>> 282:      * collection cycle.  The {@link #refersTo(Object) refersTo} method can be
>> 
>> Removing waitForReferenceProcessing is contrary to 
>> https://bugs.openjdk.org/browse/JDK-8305186
>> Reference.waitForReferenceProcessing should be more accessible
>> I've pointed to JDK-8305186 in a number of discussions about problems encountered with various tests.
>> So I'm doubtful about removing it.
>
> No problem, I will revert those removals. I did the removals proactively, thinking none of this infrastructure is needed after we migrate DBB, but since there are apparently plausible use cases for it, I'll leave it in.

Done in new commit, thanks for taking a look.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22165#discussion_r1934492345


More information about the nio-dev mailing list