public virtual void Clear() { if (_size > 0) { Array.Clear(_items, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. _size = 0; } _version++; }
/// <summary> /// Dispose the collection /// </summary> public void Dispose() { if (pArray != null) { pArray.Clear(); pArray = null; } }