Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1590
Possible memory leak on xamSchedule
posted

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

TestScheduleView.zip
Parents Reply Children
No Data