drain method
Drains everything written since the last drain, in write order, allocating a fresh list to hold it. Convenience wrapper over drainInto - prefer that one anywhere this runs every tick.
Implementation
List<RingBufferRecord> drain() {
final records = <RingBufferRecord>[];
drainInto(records);
return records;
}