Interface IObjectPool<T>
오브젝트 풀 Get/Release 계약. ObjectPool<T>와 MonoBehaviourPool<T>의 공통 인터페이스. [규칙] Get 반환값이 null이면 방어 코드 + _log.Error 필수.
public interface IObjectPool<T> where T : class
Type Parameters
T
Properties
CountActive
현재 활성 오브젝트 수.
int CountActive { get; }
Property Value
- int
CountInactive
현재 비활성(풀 대기) 오브젝트 수.
int CountInactive { get; }
Property Value
- int
Methods
Get()
풀에서 오브젝트 획득.
T Get()
Returns
- T
Release(T)
사용 완료된 오브젝트 반환. Release 후 참조 사용 금지.
void Release(T obj)
Parameters
objT