Memory leaked when ng-template is used in DropDownList

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.

Detached.png

<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>


11 Replies

PM Ponmani Murugaiyan Syncfusion Team November 8, 2021 12:38 PM UTC

Hi Albert, 

Thanks for contacting Syncfusion support. 

Currently we are checking your reported query. We will update further details in 2 business days (November 10, 2021).  We appreciate your patience until then. 

Regards, 
Ponmani M 



DR Deepak Ramakrishnan Syncfusion Team November 10, 2021 04:20 PM UTC

Hi Albert, 
 
Sorry for the inconvenience caused . 
 
We are still validating the issue , So we will update the further details in one business day(11th,November 2021). We appreciate your patience until then. 
 
Thanks, 
Deepak R.


DR Deepak Ramakrishnan Syncfusion Team November 11, 2021 06:04 PM UTC

Hi Albert, 
 
Thanks for your patience. 
 
We have validated reported issue with required scenario and found that it is working fine in our end . We have also attached snapshot and sample for your reference below. 
 
Snapshot 
 
 
 
 
 
 
We have used router sample to check memory leak issue , by navigating to the page 2 and page 1 and compared the snapshot of the memory . If this is not the replication procedure followed at your end , Kindly provide the following details to proceed further  
 
1.Video demonstration which reproduces the issue 
2.Simple sample or modify the provided sample as per your requirement which reproduces the issue. 
3.If any specific replication procedure followed to replicate the issue. 
 
 
Thanks, 
Deepak R. 



AK Albert K November 12, 2021 02:24 AM UTC

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



DR Deepak Ramakrishnan Syncfusion Team November 12, 2021 06:11 PM UTC

Hi Albert, 
 
 
Thanks for providing required details. 
 
We will validate further and update the possibilities within two business days (16th,November 2021) .We appreciate your patience until then. 
 
 
Thanks, 
Deepak R. 



DR Deepak Ramakrishnan Syncfusion Team November 22, 2021 06:30 PM UTC

Hi Albert, 
 
We deeply regret for the inconvenience caused . 
 
Yes we can able to reproduce the reported issue in our end randomly when switching between the router pages . We will update the details further within two business days(24th, November 2021).We appreciate your patience until then. 
 
 
Thanks, 
Deepak R. 



DR Deepak Ramakrishnan Syncfusion Team November 24, 2021 06:19 PM UTC

Hi Albert, 
 
Thanks for your patience. 
 
We are currently checking the feasibility to fix the issue in our end. We will update the further details in two business days(26th,November 2021).We appreciate your patience until then. 
 
 
Thanks, 
Deepak R. 
 



DR Deepak Ramakrishnan Syncfusion Team November 29, 2021 04:53 PM UTC

Hi Albert, 
 
We deeply regret for the inconvenience caused. 
 
We are still working on your requirement due to its complexity. We will update the details within two business days(1st,December 2021).We appreciate your patience until then. 
 
Thanks, 
Deepak R. 



AK Albert K November 30, 2021 01:56 AM UTC

Wow, This must be very complex memory leak issue.



DR Deepak Ramakrishnan Syncfusion Team November 30, 2021 01:49 PM UTC

Hi Albert, 
 
Thanks for the update. 
 
As mentioned earlier we will update the details as promised. We appreciate your patience until then. 
 
Thanks, 
Deepak R. 
 



DR Deepak Ramakrishnan Syncfusion Team December 1, 2021 06:57 PM UTC

Hi Albert, 
 
Thanks for your patience. 
 
We have further validated the issue in our end with the provided scenario , As the issue occurs randomly in our end and found that the elements took some time to destroy , So if we take the snapshot while destroying, it pretends like a memory leak in your end. So we request you to provide the details if you have faced any issue(s) due to the reported issue . If yes , please provide the details regarding it, to proceed further in our end . 
 
 
Thanks, 
Deepak R. 
 


Loader.
Up arrow icon