<Swing Dev> RFR: 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper [v2]
Alexander Zuev
kizune at openjdk.java.net
Mon Nov 9 23:27:55 UTC 2020
On Mon, 9 Nov 2020 18:08:57 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> We do call ninstall() at the beginning of the method but it does not resolve the issue.
>
> I meant this code at the start of the method:
> ` if (!(UIManager.getLookAndFeel() instanceof BasicLookAndFeel)) {
> uninstall();
> return;
> }`
> If "uninstall" will not solve the problem and the code added in this fix will not be executed, then we will get the same leak?
The code block here with uninstall is called if currently installed LAF is not derived from BasicLAF in which case we will not have this problem in the first place - the only place where we are setting menuInputMap variable is in this method down the line so it never gets initialized. And no, calling uninstall() unconditionally will not solve the problem because uninstall() does not change this value either.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1035
More information about the swing-dev
mailing list