API ReferenceSandbox.Internal

PublicArrayPool<T>class

Calls to ArrayPool.Shared{T} will map to this class. You can use it directly but you probably shouldn't

objectPublicArrayPool<T>
Namespace
Sandbox.Internal
Assembly
Sandbox.System
Declaration
public sealed class Sandbox.Internal.PublicArrayPool<T>

Constructors1

Showing 1 constructors

public PublicArrayPool<T>()PUBLICCONSTRUCTOR

Properties1

Showing 1 properties

public static System.Buffers.ArrayPool`1<T> Sandbox.Internal.PublicArrayPool<T>.Shared { get; set; }PUBLICSTATICGETSET

Retrieves a shared `System.Buffers.ArrayPool` instance.

Note

The shared pool provides a default implementation of `System.Buffers.ArrayPool` that's intended for general applicability. It maintains arrays of multiple sizes, and may hand back a larger array than was actually requested, but will never hand back a smaller array than was requested. Renting a buffer from it with `System.Buffers.ArrayPool.Rent(System.Int32)` 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. The shared pool instance is created lazily on first access.

Returns:ArrayPool<T>

On this page