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
What is the current behavior?
Simple material list items with ng2-dnd directive causing memory leak.
<mat-nav-list><mat-list-itemmatRipple*ngFor="let item of items"dnd-draggable[dragData]="{}"[dragEnabled]="true"></mat-list-item></mat-nav-list>
After destroying view with such usage, everything that was connected with this component will be stuck in memory. To check it you have to take few memory snapshots after destroying view with material list and ng2-dnd directive.
The problem is that the every event listener: ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop , onmousedown still binded to functions from DraggableComponent.
But is still don't understand why :(
What is the expected behavior?
I'm using angular @ViewChildren listener to get QueryList of my list items with ng2-dnd directive.
I'm submitting a ...
[ ] bug report
What is the current behavior?
Simple material list items with
ng2-dnd
directive causing memory leak.After destroying view with such usage, everything that was connected with this component will be stuck in memory. To check it you have to take few memory snapshots after destroying view with material list and
ng2-dnd
directive.The problem is that the every event listener:
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop , onmousedown
still binded to functions fromDraggableComponent
.But is still don't understand why :(
I'm using angular
@ViewChildren
listener to getQueryList
of my list items withng2-dnd
directive.And when my component destroys, i'm cutting links to functions in every
MatListItem
element.That will fix memory leak like temporary solution.
The text was updated successfully, but these errors were encountered: