protected override void Dispose(bool disposing) { if (disposing) { try { dir.MaybeThrowDeterministicException(); } finally { @delegate.Dispose(); if (dir.trackDiskUsage) { // Now compute actual disk usage & track the maxUsedSize // in the MockDirectoryWrapper: long size = dir.GetRecomputedActualSizeInBytes(); if (size > dir.maxUsedSize) { dir.maxUsedSize = size; } } dir.RemoveIndexOutput(this, name); } } }
public override void Dispose() { try { Dir.MaybeThrowDeterministicException(); } finally { @delegate.Dispose(); if (Dir.TrackDiskUsage_Renamed) { // Now compute actual disk usage & track the maxUsedSize // in the MockDirectoryWrapper: long size = Dir.RecomputedActualSizeInBytes; if (size > Dir.MaxUsedSize) { Dir.MaxUsedSize = size; } } Dir.RemoveIndexOutput(this, Name); } }