namespace MemoryPools.Collections.Specialized
{
///
/// List of elements (should be disposed to avoid memory traffic). Max size = 128*128 = 16,384 elements.
/// The best for scenarios, where you need to collect list of elements, use them and forget (w/out removal or inserts).
/// Add: O(1), Insert, Removal: O(N)
///
public sealed class PoolingListCanon : PoolingListBase where T : class
{
public PoolingListCanon() => Init();
public PoolingListCanon Init()
{
_root = Pool.GetBuffer>(PoolsDefaults.DefaultPoolBucketSize);
_ver = 0;
return this;
}
protected override IPoolingNode CreateNodeHolder()
{
return (IPoolingNode) Pool>.Get().Init(PoolsDefaults.DefaultPoolBucketSize);
}
}
}