<AWT Dev> RFR: 8182043: Access to Windows Large Icons [v4]

Alexey Ivanov aivanov at openjdk.java.net
Fri May 14 13:40:38 UTC 2021

On Tue, 11 May 2021 19:36:12 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> I will create a separate bug to track this - i do not know if library loading gets cached on some level and what impact on performance will we have if we release it every call. But i will check it out separately.
> Sure! I just wanted to bring it up. I could've submitted the bug myself… yet I decided to ask at first.
> As far as I can see `JDK_LoadSystemLibrary` has no caching, it just loads the library. If any icons are accessed `shell32.dll` will already be loaded. Probably, we never fully release it from COM. So in this case, loading and freeing will just increase and decrease the counters. Even if it's never really unloaded, we should release the resources that's not needed any more.

For documentation purposes, [JDK-8266948](https://bugs.openjdk.java.net/browse/JDK-8266948): ShellFolder2::getIconResource does not release the library loaded.


PR: https://git.openjdk.java.net/jdk/pull/2875

More information about the awt-dev mailing list