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 { // turn on the following to look for leaks closing inputs, // after fixing TestTransactions Dir.MaybeThrowDeterministicException(); } finally { Closed = true; @delegate.Dispose(); // Pending resolution on LUCENE-686 we may want to // remove the conditional check so we also track that // all clones get closed: if (!IsClone) { Dir.RemoveIndexInput(this, Name); } else { //Could this be where things aren't being deleted? } } }
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); } }