Toggling visibility of date range picker leads to memory leak
gokulb97 opened this issue · 2 comments
When toggling the date range picker the component using *ngIf cause memory leak.
This issue occurs when we open the calendar popup and hide the date range picker.
Here is example: https://stackblitz.com/edit/stackblitz-starters-jsvxq1
-
On initial load there was only one instance of date range picker component

-
After selecting dates and toggle visibility multiple times the no of instances increased

Note: The date range picker is not destroying only if user open calendar popup. I suspect this is due to event listeners attached to the apply and cancel button in the calendar popup.
We have multiple forms contains date range picker and other inputs in a page, which causing large memory leaks.
We are pleased to inform you that the reported issue, "Toggling the visibility of the date range picker leads to a memory leak" has been resolved in the latest version 26.2.11. Upgrading to this version will address the issue.
Release Notes: Essential Studio for Angular Weekly Release Release Notes (syncfusion.com)
Root Cause:
The issue occurred because the apply and close button elements were not properly destroyed when the popup was closed.
Solution:
We have addressed this by ensuring that the cancel and apply button elements are correctly removed when the popup is closed.
The reported issue has been successfully addressed in release version (v26.2.11). Consequently, we are closing this ticket for administrative purposes. Should you have any additional questions or concerns, please feel free to reopen the ticket, and we will be more than happy to assist you further.