Scenario:

1) 'treeView' is created with 'treeData' and added to the component hierarchy.
2) 'treeView' adds itself as a ListListener  on 'treeData', causing
'treeData' to maintain a reference to 'treeView'
3) 'treeView' is removed from the component hierarchy, but the user
still needs a reference to 'treeData'.

Result: 'treeView' never falls out of scope, and the user has no way
to release the reference to it since it used a private handler as its
event listener.

Should such components only listen for data events while they're
attached to the component hierarchy?

-T

Reply via email to