We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SFCalendar in popup causing memory leak.

I have a SFCalendar in a sfPopup. Everytime the calendar is show in the popup,
a few more 100mb of memory is being used. Eventually causing problems.

Below is a profile of three viewings of the popup which now has two references to the calendar.
If I were to display the popup even more times, more references will be created.

Syncfusion.SfCalendar.XForms.SfCalendar    <0x562590C> 
   Syncfusion.SfCalendar.XForms.UWP.SfCalendarMapping    <0x5627C0C> 
      NotifyCollectionChangedEventHandler    <0x5628278> 


Syncfusion.SfCalendar.XForms.SfCalendar    <0x55D758C> 
   Syncfusion.SfCalendar.XForms.UWP.SfCalendarMapping    <0x55E1B84> 
       NotifyCollectionChangedEventHandler    <0x55ED8AC>

Thanks

8 Replies

KA Karthikraja Arumugam Syncfusion Team November 12, 2019 12:35 PM UTC

Hi K Carter, 
 
Thank you for contacting Syncfusion support. 
 
Currently, we are checking the reported issue “Memory leak with SfCalendar in UWP platform”. We will validate and update you further details on or before November 14, 2019. We appreciate your patience until then. 
 
Regards, 
Karthik Raja A 



IR Indumathi Ravichandran Syncfusion Team November 14, 2019 11:59 AM UTC

Hi K Carter,     
 
Thanks for your patience. 
   
We have checked memory leak issue in UWP platform with Calendar control in PopupLayout. Checked the memory leak with Performance Profiler but single calendar instance holds in the memory even open and close popup repeatedly. We have prepared a sample for the same. Also, we have attached the tested report.   
 
Please find the sample from the below link.     
 
 
Please check the sample and report and let us know if you are still facing the same issue? If not, please modify the sample based on your scenario and revert us with more details. It will be helpful for us to analyze and provide you with the solution at the earliest.   
   
Regards,   
Indumathi R   



KC K Carter November 14, 2019 09:37 PM UTC

2 things,

1. Unrelated, I noticed using your solution that it does the same thing in mine which is, everytime the popup is re-opened and a new date is selected,
    it's not displaying the new selected day when it is re-opened. It just displays the original date from the 1st time it was opened. Even though the
    selected date property IS changing.

    How do I fix that?

2. I see the same leakage using your solution too. Here is a visual image of usage per popup for your solution.




IR Indumathi Ravichandran Syncfusion Team November 15, 2019 11:51 AM UTC

Hi K Carter, 
 
Currently, we are validating the memory leak issue in source level with Popuplayout. We will validate and update you the further details in two business days (November 19, 2019). We appreciate your patience until then. 
 
Regards, 
Indumathi R 



KC K Carter November 15, 2019 01:13 PM UTC

Thank you very much. 

Quick note: Should I post a separate issue about #1 in my last post? Or, can you look into it through our conversations
                    in this context?

Again thanks.


AK Ajith Kumar Senthil Kumar Syncfusion Team November 18, 2019 12:48 PM UTC

Hi K Carter, 
  
Based on the provided information, we have checked your query “Selected date do not get updated while open the calendar in Popuplayout”. As per the implementation this can be achieved by using Selectionchanged event of Calendar. We have prepared the simple sample, please find the sample from the below link.  
  
Please find the sample from the below link.      
  
  
Please check the sample and report and let us know if you are still facing the same issue? If not, please modify the sample based on your scenario and revert us with more details. It will be helpful for us to analyze and provide you with the solution at the earliest.    
  
Regards,
Ajith.
 



KC K Carter November 19, 2019 08:44 PM UTC

1. In your response you stated to use the "Selectionchanged event of Calendar" which I had
   already unsuccessfully tried. However, you didn't use that event as suggested.

2. In your demo solution you used an ICommand though binding "SelectionChangedCommand",
    and also MoveToDate, and SelectedDate. All using Binding.

    I used this method and "it worked" for me. Thank you.

3. Why was it necessary to use xaml binding to get this to work?

    Why did just simply setting  the MoveToDate, and the SelectedDate in a
     Selectionchanged event handler "CODE BEHIND"  for the Calendar fail to be sufficient?

4. If it should work that way also, could you please provide a demo "without" using the
    SelectionChangedCommand and just using a  Selectionchanged event handler FOR THE 
   "CODE BEHIND"  for the Calendar.

Thank you so much for all your responses.

KCarterSr


IR Indumathi Ravichandran Syncfusion Team November 20, 2019 01:30 PM UTC

Hi K Carter, 
 
Thank you for the update. 
 
As per your requirement we have prepared the sample with SelectionChanged event of calendar in Code Behind without using SelectionChangedCommand. Please check the sample from following link. 
 
 
Please check the sample and let us know if you need any further assistance. 
 
Regards, 
Indumathi R 


Loader.
Live Chat Icon For mobile
Up arrow icon