public void Deallocate(StreamID streamID) { // Deallocates the given stream in the source stream manager, and removes the header and local cache for it locally, without flushing LocalStreamHeader header; if (_headers.TryGetValue(streamID, out header)) { if (header.Stream != null) { header.Stream.Reset(); #if UNMANAGEDSTREAM FSourceStreamManager.Close(header.StreamID); #else header.Stream.Close(); #endif header.Stream = null; } _sourceStreamManager.Deallocate(header.StreamID); _headers.Remove(header.StreamID); header.Dispose(); } else { _sourceStreamManager.Deallocate(streamID); } }
void IStreamManager.Deallocate(StreamID streamID) { StreamManager.Deallocate(streamID); }