On Mon, 8 Nov 2021 17:15:12 GMT, Mandy Chung <mch...@openjdk.org> wrote:
>> I don't believe so. `no reference to the instance being cleaned` is the >> essential part (to me). > > This is what I suggested and makes it clear that *must hold no reference to > the instance being cleaned*. Maybe you didn't notice it's still there? > > > * // State class captures information necessary for cleanup. > * // It must hold no reference to the instance being cleaned > * // and therefore it is a static inner class in this CleaningExample > ``` I like this suggestion - calling out that the static-ness of the State class is due to the requirement to not hold any references. ------------- PR: https://git.openjdk.java.net/jdk/pull/6076