On Wed, 22 Jun 2022 10:23:06 GMT, John Hendrikx <[email protected]> wrote:

> This is basically another case where it is better to only listen (or bind) to 
> other targets when absolutely necessary (when the source itself is being 
> observed) and to remove the listener (or binding) when no longer observed, 
> basically lazy versus eager observation. Lazy observation would completely 
> remove the need for using weak references, simplifying the logic and making 
> the whole system much easier to reason about.

While I agree that lazy observation would be a good improvement, it just shifts 
the problem one indirection away. You could still have an entire object graph 
that is needlessly kept alive by the property wrapper, which is a problem.

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

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

Reply via email to