Ivy is leaking memory
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/core@9.0.0-rc.14 and earlier versions as well.Is this a regression?
Yes, the previous version in which this bug was not present was: View EngineDescription
Ivy is leaking memory by holding onto component references in some manner.
π¬ Minimal Reproduction
https://ng-run.com/edit/tvqV5P78BchpccNmW4XU?open=app%2Fapp.component.ts&aot=true
All this application does is create a dynamic component (TabComponent) and then immediately destroy it, within the AppComponent ngOnInit method.
In Chrome, take a memory heap snapshot of the βng-run-preview.firebaseapp.comβ instance.
Search for tabcomponent
:
β¦the destroyed component is still in memory.
On the left-hand sidebar of ng-run, click βBase Projectβ and then turn βIvy AOTβ off.
After the app reloads, take another heap snapshot and perform the same search.
β¦the destroyed component is gone from memory, which is expected.
Note: This issue might be related to #35148
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Troubleshoot Memory Problems - Axon Ivy Community
If you have a memory leak then your Axon Ivy Engine is getting slow after some time (hours, days). You may get OutOfMemoryException...
Read more >Solving Memory Leaks Issues in Ionic Angular - Cartona
We found that in Angular 9, Ivy is leaking memory and it doesn't deallocate memory of destroyed components correctly. In this issue you...
Read more >[#IVY-1362] Memory leak and infinite loop in ModuleId.java
ModuleId tries save memory by interning objects. This ModuleId cache is not synchronized and when it is mutated from concurrent threads itΒ ...
Read more >'RE: Subant calls utilizing Ivy leak memory' - MARC
[next in thread] List: ivy-user Subject: RE: Subant calls utilizing Ivy leak memory From: "Gilles Scokart" <gscokart () gmail ! com> Date: 2007-08-13Β ......
Read more >Memory Leak: Quick Sync (Hardware Acceleration)
Some versions of the Intel Graphics Driver cause a memory leak ... On systems with this problem, memory... ... 3rd Generation (Ivy Bridge)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@christianliebel, as I referenced your issue.
Cool. So I believe this issue can be closed. Yeahβ¦ng-run is great, but finicky. I also just recently realized that the
ng-run.preview.firebaseapp.com
heap dumps share memory across open tabs. So I really should have said βClose all incognito windows and open the ng-run in a fresh oneβ.