Skip to content

Angular Material MatSortHeader: mat-sort-header directive causing memory leak for matSort #22626

Open
@richieteh94

Description

@richieteh94

MatSortHeader directive (mat-sort-header) causing memory leak for component

Reproduction

Use StackBlitz to reproduce your issue:

Steps to reproduce:

  1. Click the AngularMaterialTable router link.
  2. Click the DummyPage router link
  3. take a memory snapshot of dummy page.
  4. search the snapshot with "AngularMaterialTableComponent"

Expected Behavior

AngularMaterialTableComponent class should not be present in the memory snapshot

Actual Behavior

AngularMaterialTableComponent class present in the memory snapshot

Environment

  • Angular: 10, 11
  • CDK/Material: 10, 11
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/sort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions