CollectionPool<TItem, TCollection> Class

Summary

An Animancer.ObjectPool`1 for System.Collections.Generic.ICollection`1.
Assembly
Animancer.dll
Namespace
Animancer
Base Types
Derived Types
CollectionPool
ObjectPool
Object

Syntax

public abstract class CollectionPool<TItem, TCollection> : ObjectPool<TCollection> 
    where TCollection : class, ICollection<TItem>

Type Parameters

Name Description
TItem
TCollection

Methods

Name Value Summary
Acquire() TCollection
Returns a spare item if there are any, or creates a new one.
AssertEmpty(TCollection) void
[Assert-Conditional] Asserts that the `collection` is empty.
static
Release(TCollection) void
Adds the `item` to the list of spares so it can be reused.