On Wed, 16 Jul 2025 00:11:03 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> I am not *expecting* it to be called twice. I'm just saying that with this 
>> check it would be safe if it were.
>> Not sure I even need synchronization here. Only the Disposer will have a 
>> reference.
>> So I could remove synchronized, remove the != 0 check  ... but I don't see a 
>> problem either way.
>
> That would be great if we could drop all unneeded code.

I removed the != 0 and the synchronized modifier

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26331#discussion_r2211591459

Reply via email to