ObjectPool.

DestroyExcess<T>(ObjectPool<T>, int) Method

Summary

Removes and destroys items from the pool until the System.Collections.Generic.List`1.Count reaches the `remainingSize`.
Assembly
Weaver.dll
Namespace
Weaver
Containing Type
ObjectPool

Syntax

public static void DestroyExcess<T>(this ObjectPool<T> pool, int remainingSize = 0) 
    where T : Component

Type Parameters

Name Description
T

Parameters

Name Type Description
pool ObjectPool<T>
remainingSize int

Return Value

Type Description
void