Summary
An
Animancer.ObjectPool`1
for System.Collections.Generic.ICollection`1
.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Base Types
-
- Object
- ObjectPool
<TCollection>
- Derived Types
graph BT
Type-->Base0["ObjectPool<TCollection>"]
Base0-->Base1["Object"]
Type["CollectionPool<TItem, TCollection>"]
class Type type-node
Derived0["ListPool<T>"]-->Type
click Derived0 "/animancer/api/Animancer/ListPool_1"
Derived1["SetPool<T>"]-->Type
click Derived1 "/animancer/api/Animancer/SetPool_1"
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 |
void |
[Assert-Conditional] Asserts that the `collection` is empty.
static
|
Release |
void |
Adds the `item` to the list of spares so it can be reused.
|