RFR: 8240506: TextFieldSkin/Behavior: misbehavior on switching skin [v2]

Marius Hanl mhanl at openjdk.java.net
Fri Jul 23 11:33:08 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

Sorry for the delay. Looks good to me. :)

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

Marked as reviewed by mhanl (Author).

PR: https://git.openjdk.java.net/jfx/pull/534


More information about the openjfx-dev mailing list