TRingBuffer::Trim

Set the capacity to the minimum power of two (or 0) greater than or equal to the current number of elements in the RingBuffer.