mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-02 17:53:30 +00:00
addEventListener was called with this.onDragEnter.bind(this), creating a new function reference each time, while removeEventListener was called with the unbound this.onDragEnter. The references never matched, so drag listeners were never removed on destroy. Each surviving listener closed over the directive and its host cell, retaining the whole detached datatable/task-list subtree via the parentNode chain. Heap analysis showed 624 dragenter + 624 dragover + 624 drop listeners bound to detached cells. Store the bound handlers once and use the same references for both add and remove so listeners are properly cleaned up.
Alfresco Angular Components
The docs index lists all available documentation for components and also includes a user guide that explains techniques in greater detail.