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

bug(md-spinner): possible memory leak with AoT #1283

Closed
ivoviz opened this issue Sep 20, 2016 · 1 comment · Fixed by #1838
Closed

bug(md-spinner): possible memory leak with AoT #1283

ivoviz opened this issue Sep 20, 2016 · 1 comment · Fixed by #1838
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@ivoviz
Copy link

ivoviz commented Sep 20, 2016

When using md-spinner with ngc and rollup its OnDestroy method won't run.

Simple plunker example.

The only modification made to md-progress-circle component was to add logging when OnDestroy is called. Obviously it should log destroyed twice, but it happens only once and the interdeterminateInterval keeps running in the background causing memory leak and more cpu usage.

Note that <md-progress-circle mode="indeterminate"> works and its OnDestroy method gets called, so as a workaround it's there. Also, md-spinner itself seems to work as well when not precompiled. I haven't really investigated further so I'm not sure whether it's ngc or rollup causing the issue.

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Nov 4, 2016
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 12, 2016
Fixes the `md-spinner` animation interval not being cleaned up when the app has been compiled through the AoT.
This is due to the the fact that the `ngOnDestroy` handler is in the base `MdProgressCircle` class.

Fixes angular#1283.
@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants