dooApp/FXForm2

FXForm should register weak listeners to the observed properties to improve garbage collection

Closed this issue · 0 comments

Currently FXForm uses addListener methods to register listeners to the observed properties of the source bean.
In some cases this might cause memory leak issues, because the Form is referenced from the bean through the properties listeners.
So if a form is created using a given bean as source and then all references to the form are discarded but a reference to the bean is kept, the form won't be garbage collected because of the listeners registered into the bean properties which are still referencing the form. This could be improved using weak listeners.