-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak when using ngTemplateOutlet #15578
Comments
For the record, this happen in Windows (7) environment as well |
Will this solve the problem?
|
related to #14919 ? |
@alexzuza it helps indeed :) Your version of ngTemplateOutlet does not leak memory: @ericmartinezr maybe the references are kept by the template outlet and selecting them with @ContentChildren is not necessary for the leak to occur. |
Hi, |
@tbosch I'm not sure what I should do. Should I move the templates to a sub-component? |
Yes, fixing |
Thinking about this a bit more, I think we can fix this in a general way, without needing to change |
This also clarifies via a test that we only update projected views when the view is created or destroyed, but not when it is attached/detached/moved. Fixes angular#15578
…gular#16592) This also clarifies via a test that we only update projected views when the view is created or destroyed, but not when it is attached/detached/moved. Fixes angular#15578 PR Close angular#16592
Hi, I'm wondering what the minimum version of Angular 2.x is needed to resolve this bug. Our application is using Angular 2.4.10 and I am hoping to fix this memory leak without needing to upgrade the app to Angular 4. |
@sgrinich upgrading from 2 to 4 shouldn't be too hard. Also 4.x is an LTS release. |
Ok, thanks @tsvetomir |
…gular#16592) This also clarifies via a test that we only update projected views when the view is created or destroyed, but not when it is attached/detached/moved. Fixes angular#15578 PR Close angular#16592
…gular#16592) This also clarifies via a test that we only update projected views when the view is created or destroyed, but not when it is attached/detached/moved. Fixes angular#15578 PR Close angular#16592
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ...
Current behavior
I'm using ngTemplateOutlet in a similar way to render a table:
The heap size and node count grows uncontrollably when updating the data.
Expected behavior
The heap size and node count should remain fairly constant since we're only replacing their content.
Note that the application is running in production mode.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Application memory usage should be stable.
Please tell us about your environment:
Linux
Angular version: 2.4.10, 4.0.0
Browser: Chrome 57 | Firefox 52
Language: TypeScript 2.0
The text was updated successfully, but these errors were encountered: