/*https://github.com/dotnet/aspnetcore/blob/main/src/ObjectPool*/ namespace MemoryPools { /// /// Represents a policy for managing pooled objects. /// /// The type of object which is being pooled. public interface IPooledObjectPolicy where T : notnull { /// /// Create a . /// /// The which was created. T Create(); /// /// 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. /// /// The object to return to the pool. /// if the object should be returned to the pool. if it's not possible/desirable for the pool to keep the object. bool Return(T obj); } }