Example #1
0
        protected override void Dispose(bool disposing)
        {
            try
            {
                base.Dispose(disposing);

                CopyFileStream();
            }
            finally
            {
                if (_ms != null)
                {
                    _fileCache.ReturnMemoryStream(_ms);
                }
                _ms = null;
                if (_file != null)
                {
                    _fileCache.ReturnFileStream(_file);
                }
                _file = null;
            }
        }