AdlsArrayPool<T>.ReturnAsync(T[], Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronous method to return an array to the pool that was previously obtained using the RentAsync(Int32) method on the same AdlsArrayPool<T> instance
public abstract System.Threading.Tasks.Task ReturnAsync (T[] array, bool clearArray = false);
abstract member ReturnAsync : 'T[] * bool -> System.Threading.Tasks.Task
Public MustOverride Function ReturnAsync (array As T(), Optional clearArray As Boolean = false) As Task
Parameters
- array
- T[]
A buffer to return to the pool that was previously obtained using the Rent(Int32) method.
- clearArray
- Boolean
Indicates whether the contents of the buffer should be cleared before reuse. If clearArray is set to true, and if the pool will store the buffer to enable subsequent reuse, the Return(T[], Boolean) method will clear the array of its contents so that a subsequent caller using the Rent(Int32) method will not see the content of the previous caller. If clearArray is set to false or if the pool will release the buffer, the array's contents are left unchanged.
Returns
Applies to
Azure SDK for .NET