Hi, I believe I may have discovered a memory leak in the XamScheduleView control. I have attached a sample project that illustrates this, so you can take a look at it. But first, I'll explain how we use the XamScheduleView in our actual project. We use this control to display a day schedule for certain machines in a factory. People don't interact directly with the schedule control, so it is actually a read-only chart (for the time being, at least). The data for the control is refreshed around every 5 minutes, but the application (the windows process) can run for long periods without being closed. The sample project simulates this behavior, but does the refreshing much faster, because otherwise it would take too long for the memory leak to appear.
So, in order to reproduce the memory leak, please follow these steps:
1) Start the sample
2) Notice the initial memory consumption (underlined text). In my test it was around 40 MB.
3) Slide the data generation rate to the right (fast).
4) Wait until the memory counter reaches at least 100 MB, or even longer if you want to increase the leak.
5) Drag the "Data generation rate" slider all the way to the left, so that it is paused.
6) Press the GC button; this will force garbage collection.
7) Start WinDbg, set your symbols, attach to the process, and load SOS.
8) Use !dumpheap -stat, and look for Appointment instances.
Notice that there are 1000's of instances of the Appointment class, while there are only 100 AppointmentPresenters. If these objects remain after garbage collection, then this proves the Appointment objects are being held by something. I didn't investigate further because it gets into Infragistics internals, but I believe this should provide sufficient information for you guys to investigate.
Regards, Stefan
Hello Stefan,
Thank you for your post.
I have done an initial review of the sample you have sent, and using ANTS memory profiler, I have verified that there are thousands of Appointment objects being kept in memory although they are not in view.
I am going to continue to investigate further into this matter, as I am rather unsure where these instances of the Appointment class are being kept. I will update you again when I have more information for you.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewDeveloper Support IInfragistics Inc.www.infragistics.com/support
Ok, thanks!
Ok, thank you very much.
I have reproduced this issue with the XamSchedule keeping Appointments in memory. This is unexpected behavior, so to ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 183409. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I have made this case viewable to you. It has an ID of CAS-145267-K4B5H1. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
Sincerely,AndrewDeveloper Support Engineer IInfragistics Inc.www.infragistics.com/support