clear method
Erases all data and resets the internal structure, but does not reclaim storage.
Implementation
@override
void clear() {
_guard();
_recordPool.clear();
_memoryPool.clear();
_header.numRecords = 0;
_header.numBytes = 0;
if (_flush) {
flush();
}
}