Skip to content

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

@ivoviz

Description

@ivoviz

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.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions