You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
854 B
22 lines
854 B
namespace Newtonsoft.Json
|
|
{
|
|
/// <summary>
|
|
/// Provides an interface for using pooled arrays.
|
|
/// </summary>
|
|
/// <typeparam name="T">The array type content.</typeparam>
|
|
internal interface IArrayPool<T>
|
|
{
|
|
/// <summary>
|
|
/// Rent an array from the pool. This array must be returned when it is no longer needed.
|
|
/// </summary>
|
|
/// <param name="minimumLength">The minimum required length of the array. The returned array may be longer.</param>
|
|
/// <returns>The rented array from the pool. This array must be returned when it is no longer needed.</returns>
|
|
T[] Rent(int minimumLength);
|
|
|
|
/// <summary>
|
|
/// Return an array to the pool.
|
|
/// </summary>
|
|
/// <param name="array">The array that is being returned.</param>
|
|
void Return(T[] array);
|
|
}
|
|
}
|