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

Florian Kirmaier fkirmaier at openjdk.org
Fri Aug 19 10:40:01 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:

 - Merge remote-tracking branch 'origjfx/master' into JDK-8277848-list-binding-leak
 - JDK-8277848
   Added tests to ensure no premature garbage collection is happening.
 - JDK-8277848
   Added 3 more tests to verify that a bug discussed in the PR does not appear.
 - JDK-8277848
   Added the 3 requests whitespaces
 - JDK-8277848
   Further optimization based code review.
   This Bugfix should now event improve the performance
 - JDK-8277848
   Added missing change
 - JDK-8277848
   Fixed memoryleak, when binding and unbinding a ListProperty. The same was fixed for SetProperty and MapProperty.

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

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

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

  Stats: 983127 lines in 11369 files changed: 578129 ins; 267400 del; 137598 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