I used ng-template in dropdown list to change the Styling of the dropdown but that seems to leak memory via the detached HTML, Text, etc.
The code is below.
<ejs-dropdownlist #ddpn
id="ddpn"
class="w-96"
[dataSource]="pListData"
[fields]="fields"
[value]="selectedPLD"
(change)="changeDdpn($event)">
<ng-template #itemTemplate let-pListData>
<span class="flex items-center">
<span class="text-base font-bold .font-black -mr-2">{{ pListData ? pListData.name : '' }}</span>
<span class="text-sm">{{ pListData ? pListData.rn : ''}}</span>
</span>
</ng-template>
<ng-template #valueTemplate let-pListData>
<span class="pl-1 flex items-center">
<span class="text-lg font-bold .font-black mr-2">{{ pListData ? pListData.name : '' }}</span>
<span class="text-sm">{{ pListData ? pListData.rn : ''}}</span>
</span>
</ng-template>
</ejs-dropdownlist>
|
|
Thank you for the sample. In your screen capture of the "Memory" I do see the Delta Column with increasing values. This normally indicates that the resources are not released. In this case the "Detached xxx" objects.
But I think it start leaking when the dropdownlist is on a router-outlet. The leak is obvious when switching between Page A and Page B
repeatably.
Please find enclosed the sample code.
Attachment: testtreegrid_ab6e5cd2.zip
Wow, This must be very complex memory leak issue.