public static PooledObject <T> GetPooledObject <T>([NotNull] this ObjectPool <T> pool) where T : class => new PooledObject <T>(pool);
public static PooledObject <List <TItem> > GetPooledObject <TItem>([NotNull] this ObjectPool <List <TItem> > pool) => new PooledObject <List <TItem> >(pool, p => p.AllocateAndClear(), (p, obj) => p.ClearAndFree(obj));
public static PooledObject <StringBuilder> GetPooledObject([NotNull] this ObjectPool <StringBuilder> pool) => new PooledObject <StringBuilder>(pool, p => p.AllocateAndClear(), (p, sb) => p.ClearAndFree(sb));
public static PooledObject <Dictionary <TKey, TValue> > GetPooledObject <TKey, TValue>([NotNull] this ObjectPool <Dictionary <TKey, TValue> > pool) => new PooledObject <Dictionary <TKey, TValue> >(pool, p => p.AllocateAndClear(), (p, obj) => p.ClearAndFree(obj));
public static PooledObject <T> GetPooledObject <T>([NotNull] this ObjectPool <T> pool, [NotNull] Action <ObjectPool <T>, T> releaser) where T : class => new PooledObject <T>(pool, releaser);