protected override void Dispose(bool disposing) { // If we're overwriting, free any remaining blocks NPOIFSStream toFree = new NPOIFSStream(pStream.blockStore, nextBlock); toFree.Free(loopDetector); // Mark the end of the stream pStream.blockStore.SetNextBlock(prevBlock, POIFSConstants.END_OF_CHAIN); base.Dispose(disposing); }
/** * Frees the underlying stream and property */ internal void Free() { _stream.Free(); _property.StartBlock = (POIFSConstants.END_OF_CHAIN); }