You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a long time behaviors were rarely used and the evolution of BK obsoleted some old mechanisms. For this reason we need fine tuning of behaviors attachment and detachment. When the same behavior is attached (same phase, same args, same class) any existing should be properly detached (this is currently not done and multiple behavior instances can remain active sometimes).
Better implementation should aim at avoiding duplication at all (it can happen in convoluted template binding) and when unavoidable properly detach the old instance before replacing it with the new one.
Detachment when template is destroyed seems to be ok, but if a new method called on detachment is introduced we should consider calling it on template destruction too. Not sure how important this is - event handlers in the behavior's instance do not need removal on destruction - they be destroyed die anyway, but if the behavior have something else (not part of its instance) to deinit, then this will be important.
The text was updated successfully, but these errors were encountered:
For a long time behaviors were rarely used and the evolution of BK obsoleted some old mechanisms. For this reason we need fine tuning of behaviors attachment and detachment. When the same behavior is attached (same phase, same args, same class) any existing should be properly detached (this is currently not done and multiple behavior instances can remain active sometimes).
Better implementation should aim at avoiding duplication at all (it can happen in convoluted template binding) and when unavoidable properly detach the old instance before replacing it with the new one.
Detachment when template is destroyed seems to be ok, but if a new method called on detachment is introduced we should consider calling it on template destruction too. Not sure how important this is - event handlers in the behavior's instance do not need removal on destruction - they be destroyed die anyway, but if the behavior have something else (not part of its instance) to deinit, then this will be important.
The text was updated successfully, but these errors were encountered: