<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="10.0.9" />

Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<T>

public interface IPooledObjectPolicy<T>
Represents a policy for managing pooled objects.
T Create()

Create a T.

bool Return(T obj)

Runs some processing when an object was returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool.