ObjectPool<T>.Empty
Method in ObjectPool<T>
Implements IObjectPool<T>.Empty
Declaration
public void Empty()
Description
Empties the pool of all objects.
Overload
Declaration
public void Empty(Action<T> cleanup)
Description
Empties the pool of all objects and invokes a cleanup function on each object. The cleanup function is useful, for example, if you want to destroy the objects when the pool is emptied.
Parameters
cleanup | The cleanup function to invoke on each object. |