Skip to content
This repository has been 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

Open
rekna1 opened this issue Jul 20, 2021 · 0 comments
Labels
bug Something isn't working P3

Comments

@rekna1
Copy link

rekna1 commented Jul 20, 2021

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
@rekna1 rekna1 added the bug Something isn't working label Jul 20, 2021
@mgechev mgechev added the P3 label Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working P3
Projects
None yet
Development

No branches or pull requests

2 participants