Hi
I have scheduler with resources showed in timeline view. Every 5 second scheduler is refreshed (check if there is any changes in scheduler data source). After that, for some reason, resources lose their color (became gray), so they need to be repainted, like this:
To ensure that resources are repainted, I need to call this part of code:
And it seems that this procedure RefreshViews make a problem with memory leak.
To be sure, I created a test application which every 5 second execute only coloring and refreshing of scheduler resources, for example:
In a short period of time (1 hour) application increased memory usage from 44MB to over 100MB.
In a real application memory usage growth to more than 1.5GB, and than Out of Memory exception occurred. For a testing purposes application was working almost for a 24 hours.
Is this a good approach of resource coloring, and how this can be fixed?
Thanks.
I have scheduler with resources showed in timeline view. Every 5 second scheduler is refreshed (check if there is any changes in scheduler data source). After that, for some reason, resources lose their color (became gray), so they need to be repainted, like this:
For Each res As Resource In RadScheduler1.Resources
res.Color = Color.Aquamarine
Next
To ensure that resources are repainted, I need to call this part of code:
Dim schtimelineGrouping As TimelineGroupingByResourcesElement = TryCast(RadScheduler1.SchedulerElement.ViewElement, TimelineGroupingByResourcesElement)
schtimelineGrouping.RefreshViews(True)
schtimelineGrouping = Nothing
And it seems that this procedure RefreshViews make a problem with memory leak.
To be sure, I created a test application which every 5 second execute only coloring and refreshing of scheduler resources, for example:
For Each res As Resource In RadScheduler1.Resources
res.Color = Color.Aquamarine
Next
Dim schtimelineGrouping As TimelineGroupingByResourcesElement = TryCast(RadScheduler1.SchedulerElement.ViewElement, TimelineGroupingByResourcesElement)
schtimelineGrouping.RefreshViews(True)
schtimelineGrouping = Nothing
In a real application memory usage growth to more than 1.5GB, and than Out of Memory exception occurred. For a testing purposes application was working almost for a 24 hours.
Is this a good approach of resource coloring, and how this can be fixed?
Thanks.