RFR: 8240506: TextFieldSkin/Behavior: misbehavior on switching skin [v2]
Ambarish Rapte
arapte at openjdk.java.net
Thu Jul 8 17:28:54 UTC 2021
On Wed, 7 Jul 2021 09:48:20 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.
>
> Jeanette Winzenburg has updated the pull request incrementally with one additional commit since the last revision:
>
> addressed review issues
Looks good to me.
-------------
Marked as reviewed by arapte (Reviewer).
PR: https://git.openjdk.java.net/jfx/pull/534
More information about the openjfx-dev
mailing list