public ReportingMemoryStream(byte[] bytes, RecyclableMemoryStreamManager instance) : base(bytes)
 {
     _instance = instance;
     _instance.Counter.ReportStreamCreated();
 }
 /// <summary>
 /// Allocate a new RecyclableMemoryStream object
 /// </summary>
 /// <param name="memoryManager">The memory manager</param>
 /// <param name="id">A unique identifier which can be used to trace usages of the stream.</param>
 /// <param name="tag">A string identifying this stream for logging and debugging purposes</param>
 /// <param name="requestedSize">The initial requested size to prevent future allocations</param>
 public RecyclableMemoryStream(RecyclableMemoryStreamManager memoryManager, Guid id, string tag, int requestedSize)
     : this(memoryManager, id, tag, requestedSize, null)
 {
 }
 /// <summary>
 /// Allocate a new RecyclableMemoryStream object.
 /// </summary>
 /// <param name="memoryManager">The memory manager</param>
 /// <param name="id">A unique identifier which can be used to trace usages of the stream.</param>
 public RecyclableMemoryStream(RecyclableMemoryStreamManager memoryManager, Guid id)
     : this(memoryManager, id, null, 0, null)
 {
 }
 /// <summary>
 /// Allocate a new RecyclableMemoryStream object
 /// </summary>
 /// <param name="memoryManager">The memory manager</param>
 /// <param name="id">A unique identifier which can be used to trace usages of the stream.</param>
 /// <param name="tag">A string identifying this stream for logging and debugging purposes</param>
 public RecyclableMemoryStream(RecyclableMemoryStreamManager memoryManager, Guid id, string tag)
     : this(memoryManager, id, tag, 0, null)
 {
 }
 /// <summary>
 /// Allocate a new RecyclableMemoryStream object.
 /// </summary>
 /// <param name="memoryManager">The memory manager</param>
 public RecyclableMemoryStream(RecyclableMemoryStreamManager memoryManager)
     : this(memoryManager, Guid.NewGuid(), null, 0, null)
 {
 }