ReusableMemoryStream Class
Stores a reusable MemoryStream. The MemoryStream will only be stored for reuse if its Capacity does not exceed the maximumStreamCapacity used when constructing the ReusableMemoryStream.
Assembly: Microsoft.VisualStudio.Utilities (in Microsoft.VisualStudio.Utilities.dll)
Microsoft.VisualStudio.Utilities.ReusableResourceStoreBase<TResource>
Microsoft.VisualStudio.Utilities.ReusableResourceStore<TResource, TConstructorParameter>
Microsoft.VisualStudio.Utilities.ReusableMemoryStream
| Name | Description | |
|---|---|---|
![]() | ReusableMemoryStream(Int32) | Constructs a new ReusableMemoryStream. |
| Name | Description | |
|---|---|---|
![]() | Acquire(TConstructorParameter) | Acquires a cached instance of the resource, or allocates a new instance if none are currently available. This is a disposable object that should be disposed when usage of the resource is complete.(Inherited from ReusableResourceStore<TResource, TConstructorParameter>.) |
![]() | AcquireCore() | Gets access to the resource stored by this object, and removes the resource so that subsequent callers cannot be handed the same resource at the same time.(Inherited from ReusableResourceStoreBase<TResource>.) |
![]() | Allocate(Int32) | Allocates memory for the number of streams in constructorParameter.(Overrides ReusableResourceStore<TResource, TConstructorParameter>.Allocate(TConstructorParameter).) |
![]() | CanReuse(TResource, TConstructorParameter) | Validates that an already-cached resource value is safe to reuse when Acquire is called.(Inherited from ReusableResourceStore<TResource, TConstructorParameter>.) |
![]() | Cleanup(MemoryStream) | Sets the stream length to 0. (Overrides ReusableResourceStoreBase<TResource>.Cleanup(TResource).) |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | ToString() | (Inherited from Object.) |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

