-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
area: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packagefreq2: mediummemory leakIssue related to a memory leakIssue related to a memory leaktype: bug/fix
Description
I'm submitting a ...
[x] bug report
Current behavior
I'm using ngTemplateOutlet in a similar way to render a table:
<template #cell1 let-dataItem>
{{dataItem.field1}}
</template>
<table>
<tr *ngFor="let dataItem of data">
<td>
<template [ngTemplateOutlet]="cell1" [ngOutletContext]="{ $implicit: dataItem }">
</template>
</td>
</tr>
</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
- Open this plunkr for 2.0.10 or this plunkr for 4.0.0.
- Start your browsers memory profiler or observe the process memory usage
- Notice that memory is not reclaimed
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
KirilNN, ggkrustev, DaveMBush, alexzuza, rkonstantinov and 2 more
Metadata
Metadata
Assignees
Labels
area: commonIssues related to APIs in the @angular/common packageIssues related to APIs in the @angular/common packagefreq2: mediummemory leakIssue related to a memory leakIssue related to a memory leaktype: bug/fix