> On Aug 3, 2026, at 8:34 AM, Kevin Rushforth <[email protected]> 
> wrote:
> 
> First, some JavaFX UI controls APIs take a list of objects. JavaFX internally 
> creates a WeakReference to an individual object in some cases. This is 
> tracked by JDK-8387301 [2].

I was curious about the use cases, and how they might react to different 
reference-clearing policies, so I dug into the code.

For TablePosition (#2 in JDK-8387301), turns out the WeakReference seems to go 
unused: I can delete the private `itemRef` field and the package-access 
`getItem` method, and everything still builds fine*.

(*Caveat that this is a complicated system, I’ve only built on macOS and 
haven’t run any tests. Any reason to believe this is a platform-specific 
dependency?)

I’ll keep looking at the other cases, see if they can provide any insight into 
reference-clearing policies...

Reply via email to