Pre loader

Tag: remove data

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
13k views

In my application I remove lines from SciChartSurface, but Resharper still shows that data not removed from memory.
How completely remove from memory, that GC would collect it?

Edited:

I found smth strange, don’t even know if it’s my issue or not.
The structure shows what keeps my data alive.

using (sciChart.SuspendUpdates())
                {
                    for (var i = 0; i < pavadinimai.Count; i++)
                    {
                        if (pavadinimai[i] != null)
                        {
                            this.Dispatcher.Invoke((Action)(() =>
                            {
                                var sarasas = new List<Duomenys>(LinijuSarasas);
                                var line = sarasas.SingleOrDefault(p => p.Linija.Name == pavadinimai[i]);
                                try
                                {
                                        string pavadin = pavadinimai[i];
                                        var Ynauj = Ynauji[i].Select(p => (double)p).ToList();
                                        line.XyAsiesTaskai.Append(Xnauji, Ynauj);
                                }
                                catch (Exception e)
                                {
                                    MessageBox.Show(e.ToString());
                                }
                            }));
                        }
                    }
                }

And

var asis = asiesNr.ToString();
            using (sciChart.SuspendUpdates())
            {
                for (var i = 0; i < YdtSeries.Count; i++)
                {
                    if (pavadinimai[i] != null)
                    {
                        var dataSeries = MasyvasIXySeries(XdtSeries, YdtSeries[i], pavadinimai[i]);
                        var rnd = new Random().Next(0, 10);
                        var Fast = new FastLineRenderableSeries() { SeriesColor = spalvuMasyvas[i], DataSeries = dataSeries, Name = pavadinimai[i], YAxisId = asis, StrokeThickness = 1 };
                        PridetiLinijaPrieSaraso(dataSeries, asiesNr, asis, Fast, true, false);
                        sciChart.RenderableSeries.Add(Fast);
                        //sciChart.ZoomExtents();
                    }
                }
            }
Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies