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

Memory leak with media query listeners #1213

@JoostK

Description

@JoostK

Bug Report

What is the expected behavior?

Registered event handlers are unregistered on destroy to be able to free memory.

What is the current behavior?

This media query listener is never unregistered, leasing to memory leaks:

mql.addListener(onMQLEvent);

What are the steps to reproduce?

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

In unit tests it's typical to setup and teardown an application, in which case memory from a previous run should not be retained.

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

Observed in flex-layout@9.0.0-beta.29 with Angular 9.0.4.

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

has prA PR has been created to address this issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions