/*https://github.com/dotnet/aspnetcore/blob/main/src/ObjectPool*/
namespace MemoryPools
{
///
/// Default implementation for .
///
/// The type of object which is being pooled.
public class DefaultPooledObjectPolicy
: PooledObjectPolicy where T : class, new()
{
///
public override T Create()
{
return new T();
}
///
public override bool Return(T obj)
{
// DefaultObjectPool doesn't call 'Return' for the default policy.
// So take care adding any logic to this method, as it might require changes elsewhere.
return true;
}
}
}