RFR: 8295531: ComboBoxBaseSkin: memory leak when changing skin

Andy Goryachev angorya at openjdk.org
Mon Nov 28 18:52:52 UTC 2022


as determined by SkinMemoryLeakTest (remove line 166) and a leak tester
https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/apps/LeakTest.java

Affected skins:
- ColorPicker
- DatePicker
- ComboBox

caused by:
- out-of-order modification of the control property (skin.install)
- adding skin nodes and not removing them in dispose()
- adding listeners and not removing them in dispose()

NOTE: the fix will require not only ListenerHelper [JDK-8294809](https://bugs.openjdk.org/browse/JDK-8294809) but also Skin.install() [JDK-8290844](https://bugs.openjdk.org/browse/JDK-8290844) changes.

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

Commit messages:
 - Merge remote-tracking branch 'origin/master' into
 - Merge remote-tracking branch 'origin/master' into 8295531.color.picker.skin
 - 8295531: whitespace
 - 8295531: selection model leak
 - Merge branch '8294809.listener.helper' into 8295531.color.picker.skin
 - 8294809: generics
 - Merge branch '8294809.listener.helper' into 8295531.color.picker.skin
 - 8294809: is alive
 - Revert "8294809: removed weak listeners support"
 - 8295531: combo box skin
 - ... and 42 more: https://git.openjdk.org/jfx/compare/3376228a...f7a3eeba

Changes: https://git.openjdk.org/jfx/pull/922/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=922&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295531
  Stats: 189 lines in 6 files changed: 83 ins; 44 del; 62 mod
  Patch: https://git.openjdk.org/jfx/pull/922.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/922/head:pull/922

PR: https://git.openjdk.org/jfx/pull/922


More information about the openjfx-dev mailing list