-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(table): leaking reference through mostRecentCellOutlet #12269
perf(table): leaking reference through mostRecentCellOutlet #12269
Conversation
Fixes the table leaking out a reference to a cell outlet via the `CdkCellOutlet.mostRecentCellOutlet` after all tables have been destroyed. Fixes angular#12259.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Along the same lines as angular#12269. Clears out the `mostRecentTreeNode` once the last tree node is destroyed, in order to avoid a memory leak.
Along the same lines as #12269. Clears out the `mostRecentTreeNode` once the last tree node is destroyed, in order to avoid a memory leak.
Along the same lines as #12269. Clears out the `mostRecentTreeNode` once the last tree node is destroyed, in order to avoid a memory leak.
Fixes the table leaking out a reference to a cell outlet via the `CdkCellOutlet.mostRecentCellOutlet` after all tables have been destroyed. Fixes #12259.
6.4.2 is generating this error when navigating from the page that I believe might be from this update. My Table setup (no issues in 6.4.1)
|
@JamieMcI just looking at the stack trace, it doesn't look like something coming from Material. At least in the table, we don't have any explicit calls to |
Having trouble putting together an example, so I apologize if this isn't helpful. Wanted to give a quick update. Referencing this Stack overflow I set my build-optimizer = false. This fixed the issue. The reason I reference this here is because 6.4.2 introduced the problem and the commit for this issue implements a new ngOnDestroy. This could just be my code base when the optimizer tries to combine the new code in 6.4.2 with my project. Not super clear on how the optimizer works. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes the table leaking out a reference to a cell outlet via the
CdkCellOutlet.mostRecentCellOutlet
after all tables have been destroyed.Fixes #12259.