RFR: 8319779: SystemMenu: memory leak due to listener never being removed [v2]

Jose Pereda jpereda at openjdk.org
Wed Dec 13 09:22:50 UTC 2023


On Mon, 20 Nov 2023 08:00:58 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> A listener was added but never removed.
>> This patch removes the listener when the menu it links to is cleared. Fix for https://bugs.openjdk.org/browse/JDK-8319779
>
> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
> 
>   process reviewers comments

About adding an automated test, the leak that PR tries to fix happens in `com.sun.javafx.tk.quantum.GlassSystemMenu`, which is package private, and adding new tests to check `javafx.scene.control.Menu`, or related public classes, won't catch that leak, will it?

Unless we open it (and all the related classes/methods in `com.sun.glass.ui.*`), I don't think it can be done?

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

PR Comment: https://git.openjdk.org/jfx/pull/1283#issuecomment-1853543288


More information about the openjfx-dev mailing list