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

Ambarish Rapte arapte at openjdk.java.net
Mon Dec 21 12:19:57 UTC 2020

On Thu, 15 Oct 2020 23:24:54 GMT, Kevin Rushforth <kcr 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 716:
>> 714: 
>> 715:     private boolean isHorizontal() {
>> 716:         Side tabPosition = getSkinnable() != null ? getSkinnable().getSide() : Side.TOP;
> I agree with @kleopatra This null check suggests that someone (a listener perhaps?) is calling into the skin after it has been disposed.

The NPE here occurs if `tabHeaderArea` is not removed when disposing the skin.
Actually this NPE does not occur with commit#1 and the null check was not needed, It is removed now.
(The NPE can be observed by removing line#283 from TabPaneSkin.java of this fix)


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

More information about the openjfx-dev mailing list