/// <summary> Closes the underlying <see cref="Lucene.Net.Store.IndexInput" /> streams, including any ones associated with a /// lazy implementation of a Field. This means that the Fields values will not be accessible. /// /// </summary> /// <throws> IOException </throws> public void Dispose() { // Move to protected method if class becomes unsealed if (!closed) { if (fieldsStream != null) { fieldsStream.Close(); } if (isOriginal) { if (cloneableFieldsStream != null) { cloneableFieldsStream.Close(); } if (cloneableIndexStream != null) { cloneableIndexStream.Close(); } } if (indexStream != null) { indexStream.Close(); } fieldsStreamTL.Dispose(); closed = true; } }
public void Dispose() { if (isDisposed) { return; } // Move to protected method if class becomes unsealed if (origEnum != null) { origEnum.Dispose(); } threadResources.Dispose(); isDisposed = true; }
protected virtual void Dispose(bool disposing) { if (isDisposed) { return; } if (disposing) { if (tokenStreams != null) { tokenStreams.Dispose(); tokenStreams = null; } } isDisposed = true; }