On Wed, 13 Nov 2024 00:01:40 GMT, Chen Liang <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java line 244:
>>
>>> 242: * implementation class from unloading when the caller is a {@linkplain
>>> 243: * MethodHandles.Lookup.ClassOption#STRONG hidden class} and is
>>> unloaded, or when
>>> 244: * the returned call site is no longer strongly reachable.
>>
>> I don't get the last part of the sentence here. When the call site is no
>> longer reachable _that_ prevents the class from being unloaded?
>>
>> I like the implNote though. Maybe: "This technique reduces heap memory use,
>> but it prevents the implementation class from being unloaded independently
>> of its defining class loader" ?
>
> Re this sentence: I wish to indicate "caller is unloaded and impl class is
> unreachable elsewhere (besides in the ClassLoader)". Maybe just "caller is
> unloaded" is fine. Thoughts on phrasing?
Maybe 'caller's class is unloaded'.
Also, is the link correct? It links to the STRONG option, but the link text is
'hidden class'.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21912#discussion_r1839798268