Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

fix(match-media): unregister media query event listeners on destroy #1236

Merged
merged 1 commit into from
May 11, 2020

Conversation

CaerusKaru
Copy link
Member

When the internal registry of media query listeners is reset, or
MatchMedia is destroyed, the listeners themselves are not currently
being removed. This leads to memory leaks, which is corrected by
this commit.

Fixes #1213

@CaerusKaru CaerusKaru added this to the 9.0.0-beta.30 milestone May 7, 2020
@CaerusKaru CaerusKaru force-pushed the adam/fix-issue-1213 branch 2 times, most recently from 39fc087 to 524a799 Compare May 7, 2020 23:53
@CaerusKaru CaerusKaru force-pushed the adam/fix-issue-1213 branch 2 times, most recently from 3ca1544 to feae404 Compare May 10, 2020 22:38
When the internal registry of media query listeners is reset, or
MatchMedia is destroyed, the listeners themselves are not currently
being removed. This leads to memory leaks, which is corrected by
this commit.

Fixes #1213
@CaerusKaru CaerusKaru force-pushed the adam/fix-issue-1213 branch from feae404 to ee0d689 Compare May 11, 2020 16:41
@CaerusKaru CaerusKaru merged commit 2ca7848 into master May 11, 2020
@CaerusKaru CaerusKaru deleted the adam/fix-issue-1213 branch May 11, 2020 17:39
@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 Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak with media query listeners
3 participants