Class MemoryStreamPool
Provides System.IO.MemoryStream instances with pooled buffers to reduce heap fragmentation and GC pressure
Inheritance
System.Object
MemoryStreamPool
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OSGeo.MapGuide.ObjectModels
Assembly: OSGeo.MapGuide.ObjectModels.dll
Syntax
public static class MemoryStreamPool
Methods
| Improve this Doc View SourceGetStream()
Returns a recyclable System.IO.MemoryStream
Declaration
public static MemoryStream GetStream()
Returns
Type | Description |
---|---|
System.IO.MemoryStream |
GetStream(String)
Returns a recyclable System.IO.MemoryStream
Declaration
public static MemoryStream GetStream(string tag)
Parameters
Type | Name | Description |
---|---|---|
System.String | tag |
Returns
Type | Description |
---|---|
System.IO.MemoryStream |
GetStream(String, Byte[])
Returns a recyclable System.IO.MemoryStream initialized with the given buffer
Declaration
public static MemoryStream GetStream(string tag, byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.String | tag | |
System.Byte[] | buffer |
Returns
Type | Description |
---|---|
System.IO.MemoryStream |
GetStream(String, Byte[], Int32, Int32)
Returns a recyclable System.IO.MemoryStream initialized with the given buffer
Declaration
public static MemoryStream GetStream(string tag, byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.String | tag | |
System.Byte[] | buffer | |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.IO.MemoryStream |