`TabPaneSkin` installs some listeners that are not removed when `TabPaneSkin` is changed. The fix converts listeners to WeakListeners and also removes them on dispose.
There is a NPE check change needed in `isHosrizontal()`. Without this check it causes NPE if pulse is in progress while TabPaneSkin is getting disposed. `SkinMemoryLeakTest` already had a test which only needed to be enabled. Test fails before and passes after this change. ------------- Commit messages: - 8242621: TabPane: Memory leak when switching skin Changes: https://git.openjdk.java.net/jfx/pull/318/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=318&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8242621 Stats: 61 lines in 2 files changed: 43 ins; 10 del; 8 mod Patch: https://git.openjdk.java.net/jfx/pull/318.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/318/head:pull/318 PR: https://git.openjdk.java.net/jfx/pull/318
