Possible memory leak
See original GitHub issueBug Report
I’m pretty sure I have a memory leak on the universal side of things, although I may be wrong as I’m no expert with memory leaks.
The screenshot is a series of snapshots after refreshing the same page a few times (and I mean a few times)
One thing that seem to be growing is string containing the page html so I’m assuming this will be something to do with the express engine.

my implementation is
app.engine(
'html',
ngExpressEngine({
bootstrap: AppServerModuleNgFactory,
providers: [
provideModuleMap(LAZY_MODULE_MAP),
]
})
);
What modules are related to this issue?
- [ ] aspnetcore-engine
- [ ] common
- [x] express-engine
- [ ] hapi-engine
- [x] module-map-ngfactory-loader
Minimal reproduction with instructions:
https://github.com/dottodot/ang6-test
It can been seen in a basic repo but the growth is much slower but I put that down to the content being render is much more simple.
What is the use-case or motivation for changing an existing behavior?
Environment:
@nguniversal versions
- aspnetcore-engine:
- common:
- express-engine:
- hapi-engine:
- module-map-ngfactory-loader:
<!--
Output from: `ng --version`.
If nothing, output from: `node --version` and `npm --version`.
Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
-->
Angular CLI: 7.0.3 Node: 8.12.0 OS: darwin x64 Angular: 7.0.2 … animations, cdk, common, compiler, compiler-cli, core, forms … http, language-service, material, material-moment-adapter … platform-browser, platform-browser-dynamic, platform-server … router, service-worker
Package Version
@angular-devkit/architect 0.10.3 @angular-devkit/build-angular 0.10.3 @angular-devkit/build-optimizer 0.10.3 @angular-devkit/build-webpack 0.10.3 @angular-devkit/core 7.0.3 @angular-devkit/schematics 7.0.3 @angular/cli 7.0.3 @angular/pwa 0.10.3 @ngtools/webpack 7.0.3 @schematics/angular 7.0.3 @schematics/update 0.10.3 rxjs 6.3.3 typescript 3.1.5 webpack 4.19.1
Is there anything else we should know?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
OK I believe I found the cause.
I have a carousel on my site that uses Flickity which is dependant on
window
and I was using the following to stop the window is not defined error.Not sure why this causes the memory leak but wrapping my carousel with a isBrowser check seem to prevent the leak happening.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.