Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
public sealed class Buffer<T> : IDisposable
The element type of the array to buffer.
public T[] Array { get; }
System.InvalidOperationException | Cannot access a buffer while it is freed. |
public int Count { get; }
System.InvalidOperationException | Cannot access a buffer while it is freed. |
public bool IsFree { get; }
public static Buffer<T> Claim(int minimumCapacity)
System.Int32 | minimumCapacity | The minimum capacity. |
Buffer<T> | A buffer which has a capacity equal to or larger than the specified minimum capacity. |
System.ArgumentException | Requested size of buffer must be larger than 0. |
public void Dispose()
public void Free()
public static void Free(Buffer<T> buffer)
Buffer<T> | buffer | The buffer to free. |
System.ArgumentNullException | The buffer argument is null. |