Beispiel #1
0
        private void CopyAndCompress()
        {
            QArrayInner array = new QArrayInner(this as IQArray <T>);

            storage.RemoveReference();
            storage = array;
            start   = 0;
            step    = 1;
        }
Beispiel #2
0
 /// <summary>
 /// Creates a new inner array from an existing one.
 /// </summary>
 /// <param name="other">The existing inner array.</param>
 /// <param name="detach">If true, indicates that the new copy is being detached from the other inner array,
 /// so the reference count of the other array should be decremented.</param>
 private QArrayInner(QArrayInner other, bool detach)
 {
     if (other.storage != null)
     {
         storage = other.storage.Select(ArrayElement).ToList();
     }
     if (detach)
     {
         other.RemoveReference();
     }
 }