/// <summary> /// <see cref="BalancingStaticPoolManager{TElem}"/> constructor /// </summary> /// <param name="comparer">Comparer which will be used to select the best element from pool</param> /// <param name="name">Name for the current <see cref="BalancingStaticPoolManager{TElem}"/> instance</param> /// <param name="destroyAction">The action that will be performed to destroy each element after removal ('null' means no action)</param> public BalancingStaticPoolManager(IComparer <TElem> comparer, string name, Action <TElem> destroyAction) : this(PoolElementComparer <TElem> .Wrap(comparer), name, destroyAction) { }
/// <summary> /// <see cref="BalancingStaticPoolManager{TElem}"/> constructor /// </summary> /// <param name="comparer">Comparer which will be used to select the best element from pool</param> /// <param name="name">Name for the current <see cref="BalancingStaticPoolManager{TElem}"/> instance</param> /// <param name="disposeElementOnDestroy">Whether the <see cref="IDisposable.Dispose"/> should be called for element after removal</param> public BalancingStaticPoolManager(IComparer <TElem> comparer, string name, bool disposeElementOnDestroy) : this(PoolElementComparer <TElem> .Wrap(comparer), name, disposeElementOnDestroy ? new Action <TElem>(CallElementDispose) : null) { }
/// <summary> /// <see cref="BalancingStaticPoolManager{TElem}"/> constructor /// </summary> /// <param name="comparer">Comparer which will be used to select the best element from pool</param> /// <param name="name">Name for the current <see cref="BalancingStaticPoolManager{TElem}"/> instance</param> public BalancingStaticPoolManager(IComparer <TElem> comparer, string name) : this(PoolElementComparer <TElem> .Wrap(comparer), name, null) { }