Skip to content

[Sidenav] Memory leak when used inside router-outlet #8862

Open
@npen

Description

@npen

Bug, feature request, or proposal:

When a sidenav is used "inside" router-outlet, it seems there is a memory leak. When the router-outlet is inside the sidenav, there is no problem.

I use the "Take heap snapshot" of Chrome to see the problem.

What are the steps to reproduce?

Sample available on:

https://stackblitz.com/edit/angular-material2-issue-xmgukp?file=app%2Fapp.component.ts

Open in Chrome:

https://angular-material2-issue-xmgukp.stackblitz.io/

  • Switch between "one" and "two" routes a few times.
  • Take a heap snapshot
  • Switch again between routes
  • Take another snapshot and compare => OneComponent and TwoComponent are not freed (among many other objects...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sidenavperfThis issue is related to performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions