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
Registered event handlers are unregistered on destroy to be able to free memory.
What is the current behavior?
In #1080, event handlers for the beforeprint and afterprint events are registered. These are never unregistered, which is causing unnecessary memory retention (especially in unit tests).
What are the steps to reproduce?
Include flex-layout in a project with multiple unit tests and capture a memory heap dump in Chrome Inspector. You'll find many retained tasks. Zone.js captures tasks for these events in globals on the window object:
__zone_symbol__beforeprintfalse and __zone_symbol__afterprintfalse
What is the use-case or motivation for changing an existing behavior?
In unit tests it's typical to setup and teardown an application, in which case memory from a previous run should not be retained.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Bug Report
What is the expected behavior?
Registered event handlers are unregistered on destroy to be able to free memory.
What is the current behavior?
In #1080, event handlers for the
beforeprint
andafterprint
events are registered. These are never unregistered, which is causing unnecessary memory retention (especially in unit tests).What are the steps to reproduce?
Include flex-layout in a project with multiple unit tests and capture a memory heap dump in Chrome Inspector. You'll find many retained tasks. Zone.js captures tasks for these events in globals on the window object:
__zone_symbol__beforeprintfalse
and__zone_symbol__afterprintfalse
What is the use-case or motivation for changing an existing behavior?
In unit tests it's typical to setup and teardown an application, in which case memory from a previous run should not be retained.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Observed in [email protected] with Angular 9.0.4.
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: