RFR: 8242621: TabPane: Memory leak when switching skin [v3]

Ambarish Rapte arapte at openjdk.java.net
Wed Jan 6 11:21:01 UTC 2021

On Tue, 5 Jan 2021 15:19:21 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:
>>   Review update
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java line 1239:
>> 1237:             }
>> 1238:             controlButtons.removeListeners();
>> 1239:         }
> would suggest to rename the method to dispose - even though this here indeed does nothing but removing listeners (future changes might need to do additional cleanup).  That would be a  clear indication of its responsibility, just the same name as the cleanup method you added for TabContentRegion. If we decide to go for the rename, it should be done for all occurences of removeListeners in the other internal panes.

The change sounds good to me. Please check the updated commits. All the `removeListeners()` methods are now renamed as `dispose()`.


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

More information about the openjfx-dev mailing list