<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="11.0.0-preview.1.26104.118" />

Microsoft.Extensions.ObjectPool.LeakTrackingObjectPool<T>

public class LeakTrackingObjectPool<T> : ObjectPool<T>
An ObjectPool<T> implementation that detects leaks in the use of the object pool.

A leak is produced if an object is leased from the pool but not returned before it is finalized. An error is only produced in Debug builds. This type is only recommended to be used for diagnostic builds.

Initializes a new instance of LeakTrackingObjectPool<T>.