Standard bindings keep a hard-ref to the bound observable, which allow you to do some property views like:
objProperty.bind(intProperty.asObject());
The asObject() would would not be GC'ed as the property references the view.
With bidirectional bindings, the view will be lost however, as bidirectional bindings are weak.
We should introduce a variant of bidirectional bindings that would use hard references and the developer would be responsible for freeing the resources.
objProperty.bind(intProperty.asObject());
The asObject() would would not be GC'ed as the property references the view.
With bidirectional bindings, the view will be lost however, as bidirectional bindings are weak.
We should introduce a variant of bidirectional bindings that would use hard references and the developer would be responsible for freeing the resources.
- relates to
-
JDK-8093223 asObject() bindings always get Garbage Collected
-
- Closed
-