RFR: 8339341: SurfaceManager cacheMap retains strong references [v4]

Jayathirth D V jdv at openjdk.org
Wed Oct 9 11:36:00 UTC 2024


On Thu, 19 Sep 2024 11:54:56 GMT, Nikita Gubarkov <ngubarkov at openjdk.org> wrote:

>> I moved SurfaceDataProxy cache into a separate class.
>> Now caching level is determined by placement of the SurfaceManager.ProxyCache object instead of a "proxy key". This cache "owns" proxies and therefore strong refs via them do not prevent the cache and GraphicsConfig from being detected as weakly reachable.
>
> Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revert wildcard import in X11GraphicsDevice

I was able to verify that we are holding strong reference to MTLGraphicsConfig object using MAT/VisualVM and reproducer attached in JBS after using multi monitor in macOS.

After change i see that we have weak references.
Since this change is already tested in our CI. LGTM.

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

Marked as reviewed by jdv (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20825#pullrequestreview-2356874422


More information about the client-libs-dev mailing list