RFR: 8277848 Binding and Unbinding to List leads to memory leak [v6]

Florian Kirmaier fkirmaier at openjdk.org
Thu Jul 14 10:23:10 UTC 2022


> Making the initial listener of the ListProperty weak fixes the problem.
> The same is fixed for Set and Map.
> Due to a smart implementation, this is done without any performance drawback.
> (The trick is to have an object, which is both the WeakReference and the Changelistener)
> By implying the same trick to the InvalidationListener, this should even improve the performance of the collection properties.

Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:

  JDK-8277848
  Added tests to ensure no premature garbage collection is happening.

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/689/files
  - new: https://git.openjdk.org/jfx/pull/689/files/5294483b..b744a098

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=689&range=05
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=689&range=04-05

  Stats: 66 lines in 3 files changed: 66 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jfx/pull/689.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/689/head:pull/689

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


More information about the openjfx-dev mailing list