Integrated: 8240506: TextFieldSkin/Behavior: misbehavior on switching skin
Jeanette Winzenburg
fastegal at openjdk.java.net
Sun Jul 25 11:38:19 UTC 2021
On Thu, 17 Jun 2021 12:41:56 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
> The issue is about memory leaks and side-effects (like NPEs) when switching skins.
>
> Details (copied from issue for convenience):
>
> memory leak in TextInputControlBehavior:
> - listener accidentally added twice (removed once)
> - keyPad mappings not properly installed/disposed
>
> memory leak TextFieldBehavior:
> - listeners to scene/focusOwner property not removed,
>
> memory leak in TextInputControlSkin:
> - event handlers related to inputMethods not removed
>
> issues in TextFieldSkin:
> - memory leak due to behavior leaking
> - memory leaks due to manually added change/invalidation listeners that are not removed
> - memory leaks due to not removing children with strong references to skin
> - side-effects (f.i. NPEs) due to listeners/bindings that are still active after dispose
>
> Fix was to properly install/remove those listeners/handlers. Added tests that failed/passed before/after the fix, respectively, also added tests passing before that must pass after the fix.
This pull request has now been integrated.
Changeset: 653e24ba
Author: Jeanette Winzenburg <fastegal at openjdk.org>
URL: https://git.openjdk.java.net/jfx/commit/653e24baef01c52ec11efab255bf506ee55e4d2a
Stats: 752 lines in 10 files changed: 686 ins; 38 del; 28 mod
8240506: TextFieldSkin/Behavior: misbehavior on switching skin
Reviewed-by: mhanl, arapte
-------------
PR: https://git.openjdk.java.net/jfx/pull/534
More information about the openjfx-dev
mailing list