On Tue, 8 Apr 2025 14:47:04 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> This PR proposes to use an anonymous class rather than a lambda in order to 
> improve startup time.
> 
> We need to make sure the regression is fixed by this. It might be the case 
> that the regression is there because 
> [JDK-8347047](https://bugs.openjdk.org/browse/JDK-8347047) actually fixed an 
> issue so that the segments could be collected by the GC.

src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java 
line 172:

> 170:                     }
> 171:                 }
> 172:                 : null;

Could you please add a comment here to explain why an anonymous class is being 
used.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24514#discussion_r2033395739

Reply via email to