Skip to content

Microsoft.IO.RecyclableMemoryStream 3.0.0

Compare
Choose a tag to compare
@benmwatson benmwatson released this 11 Dec 23:41
· 24 commits to master since this release
2dbbc07

Breaking Changes

  • Removed int-based constructor and GetStream overloads where long-based methods exist.
  • Removed all methods marked with [Obsolete]:
    • StreamDisposedEventArgs.ctor(Guid, string, string, string)
    • RecyclableMemoryStreamManager.GetStream(Guid, string, Memory<byte>)
    • RecyclableMemoryStreamManager.GetStream(Memory<byte>)
    • RecyclableMemoryStreamManager.GetStream(string, Memory<byte>)
  • Enable nullable annotations and warnings. i.e., added <Nullable>enabled</Nullable> to the project file.
  • All overloads of RecyclableMemoryStreamManager.GetStream now return type RecyclableMemoryStream instead of MemoryStream.
  • Removed explicit targets for net462, netcoreapp2.1, and net5.0. Supported targets are netstandard2.0, netstandard2.1, and net6.0 (there are a few net6.0-specific optimizations).
  • Moved all the configuration settings for RecyclableMemoryStreamManager to the new RecyclableMemoryStreamManager.Options class. Removed many of the constructors as a result. This class will facilitate easier dependency injection through use of the Options pattern, for those who need it.
  • Renamed some settings' names to be more consistent (e.g., MaximumLargePoolFreeBytes)

New Features

  • Added a new option for RecyclableMemoryStreamManager: ZeroOutBuffer, which will cause all buffers to be cleared on allocation and when returning to the pool. Off by default.

Other Changes

  • Upgrade NUnit test library to version 4.
  • Fix some spelling issues in comments and variable names.
  • Update code to the latest recommended C# syntax.

NuGet: Microsoft.IO.RecyclableMemoryStream 3.0.0