Thanks to visit codestin.com
Credit goes to github.com

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

dev tools holds reference to destroyed component, changing the application behaviour #889

@rekna1

Description

@rekna1

Angular DevTools version (required): 1.0.2

Angular version (required): 11.2.1

Description of issue:
I have a list component and a detail component.
Detail component is on child route of parent component.
When using devtools to inspect detail component, than navigating to parent route, the child component is retained in memory.
I can see ngDestroy is called on the child component.
Because it is still in memory, some observables of destroyed child component still emit (e.q. an observable that retrieves data, so fires an http request) (all observables used in detail are using | async pipe)
You can see in screenshot it is retained by the inspectedApplication (screenshot part of memory profiler chrome).
When I disable angular dev tools, the application behaves as expected.

I would expect dev tools to not cause any different behavior in applications.

  • Include (clipped) screenshot images if possible.
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions