21 lines
556 B
C#
21 lines
556 B
C#
using Microsoft.IO;
|
|
|
|
namespace NewCRICS.Models
|
|
{
|
|
public class MMA
|
|
{
|
|
private static readonly RecyclableMemoryStreamManager manager = new RecyclableMemoryStreamManager();
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
//https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream
|
|
var sourceBuffer = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 };
|
|
|
|
using (var stream = manager.GetStream())
|
|
{
|
|
stream.Write(sourceBuffer, 0, sourceBuffer.Length);
|
|
}
|
|
}
|
|
}
|
|
}
|