Drop data from HighLowSeries
Posted: Wed Mar 30, 2022 6:26 am
I have a requirement to drop old data from a HighLowSeries manually every 30 minutes or so. Currently i've implemented this as follows:
- copy the highlowseriespoints to a temporary list. (highlow.Points.ToList().GetRange(0, highlow.PointCount))
- remove old highlowseriespoints from temporary list.
- clear highlowseries (highlow.Clear())
- add temporary list to highlowseries (highlow.AddValues(templist.ToArray())
It seems this results in a memory leak somehow. What is the correct way to do this?
- copy the highlowseriespoints to a temporary list. (highlow.Points.ToList().GetRange(0, highlow.PointCount))
- remove old highlowseriespoints from temporary list.
- clear highlowseries (highlow.Clear())
- add temporary list to highlowseries (highlow.AddValues(templist.ToArray())
It seems this results in a memory leak somehow. What is the correct way to do this?