Bewerken

Share via


ArrayPool<T>.Shared Property

Definition

Gets a shared ArrayPool<T> instance.

public:
 static property System::Buffers::ArrayPool<T> ^ Shared { System::Buffers::ArrayPool<T> ^ get(); };
public static System.Buffers.ArrayPool<T> Shared { get; }
static member Shared : System.Buffers.ArrayPool<'T>
Public Shared ReadOnly Property Shared As ArrayPool(Of T)

Property Value

A shared ArrayPool<T> instance.

Remarks

The shared pool provides a default implementation of the ArrayPool<T> class that's intended for general applicability. A shared class maintains arrays of multiple sizes, and may hand back a larger array than was actually requested, but it will never hand back a smaller array than was requested. Renting a buffer from a shared class using the Rent method will result in an existing buffer being taken from the pool if an appropriate buffer is available or in a new buffer being allocated if one is not available.

Applies to