public VArray Push() { var depth = _depth++; if (depth > _currentBuffer.MaxDepth) { _currentBuffer = _currentBuffer.Next ?? new VBuffer(_currentBuffer); } return(_currentBuffer.GetVArray(depth)); }
public VArray Push() { var depth = _depth++; if (depth > _currentBuffer.MaxDepth) { // If the buffer is not big enough add another segment to the linked list (the constructor takes care of the linking). // Note that the segments are not pooled on their own. The whole linked list of buffers is pooled. _currentBuffer = _currentBuffer.Next ?? new VBuffer(_currentBuffer); } return(_currentBuffer.GetVArray(depth)); }