public override void Dispose() { try { if (_upto > 0) { // NOTE: entries in the block after current upto are // invalid FlushBlock(); } } finally { OUTPUT.Dispose(); } }
public override void Dispose() { try { if (_hitExcDuringWrite) { return; } // stuff 0s in until the "real" data is flushed: var stuffed = 0; while (_upto > stuffed) { _upto -= Add(0) - 1; Debug.Assert(_upto >= 0); stuffed += 1; } } finally { OUTPUT.Dispose(); } }