Skip to content
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

Tooltip memory leak with Angular router #14247

Closed
jo-me opened this issue Nov 23, 2018 · 2 comments
Closed

Tooltip memory leak with Angular router #14247

jo-me opened this issue Nov 23, 2018 · 2 comments

Comments

@jo-me
Copy link

jo-me commented Nov 23, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Components are cleaned up after they are destroyed

What is the current behavior?

Components remain in memory IF a tooltip on these components has been triggered.

The behavior could be tied to situations where the angular router is involved. The components & data of a route remain in memory after switching to a different route - again, only if a tooltip has been triggered.
The workaround in related issue (removing HammerJS references) did not work in my situation. Leak was still present.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material-tooltip-memleak

When you switch tabs back and forth between Login and Home tab, you will notice that the HomeComponent will not show up in a heap dump (when you're currently on the Login tab).
However, if you trigger the tooltip on the Home tab and then go back to Login, the HomeComponent will still be on the heap along with everything it references (e.g. data)

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Originally in Angular 6.1 / Material 6.4.7 but it is still present in the stackblitz above which is baed on
Angular 7.0.4 and Material 7.0.4

Is there anything else we should know?

Lots of similar issues related to tooltip memory leaks:
#8989
#4499
...

@josephperrott
Copy link
Member

Closing as duplicate of #8989

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants