I've tracked it down to my use of the Series<T> Generic, to store rich objects which are make up a huge object graph shared between multiple Ninjascript contexts.
That's fine, I just need to get the remove all the contents from the Series<T> instances on termination, and dispose the objects if applicable. Easy.
Not easy lol.
the Count() method gives a value of 1000 even though there's only a few objects in there, I don't know how many objects there are or at which position they are at.
This code doesn't work, because IsValidDataPoint returns true, despite the assignment to null failing as an ArrrayIndexerOutOfBounds exception.
for (int i = 1; i <= _validPivots.Count; i++) { if (_validPivots.IsValidDataPointAt(i)) { var disposable = _validPivots.GetValueAt(i) as IDisposable; if (disposable != null) disposable.Dispose(); _validPivots[i - 1] = null; } }
Am I missing something obvious here? Or is it impossible to clear a Series?
Comment