Reputation: 427
As show in the picture, the Nodes keep increasing. I have a lot of ngFor loops, that I currently am not using the async pipe on - would this be the root cause?
ngOnDestroy are firing when switching.
Upvotes: 2
Views: 3723
Reputation: 330
Well, any lifecycle hook will cause the observable tree to recalculate. Are you using parameters for your route by chance? onDestroy is specifically used when you leave that component entirely, not rerender data. If you are using components inline, then every single time that component rerenders you will be calling its OnDestroy hook. If you can provide code, maybe I can assist you further unless that helps spark something.
Upvotes: 3