Game Framework  2021.05.31
ReferencePool类 参考

引用池。 更多...

静态 Public 成员函数

static ReferencePoolInfo[] GetAllReferencePoolInfos ()
 获取所有引用池的信息。 更多...
 
static void ClearAll ()
 清除所有引用池。 更多...
 
static T Acquire< T > ()
 从引用池获取引用。 更多...
 
static IReference Acquire (Type referenceType)
 从引用池获取引用。 更多...
 
static void Release (IReference reference)
 将引用归还引用池。 更多...
 
static void Add< T > (int count)
 向引用池中追加指定数量的引用。 更多...
 
static void Add (Type referenceType, int count)
 向引用池中追加指定数量的引用。 更多...
 
static void Remove< T > (int count)
 从引用池中移除指定数量的引用。 更多...
 
static void Remove (Type referenceType, int count)
 从引用池中移除指定数量的引用。 更多...
 
static void RemoveAll< T > ()
 从引用池中移除所有的引用。 更多...
 
static void RemoveAll (Type referenceType)
 从引用池中移除所有的引用。 更多...
 

属性

static bool EnableStrictCheck [get, set]
 获取或设置是否开启强制检查。 更多...
 
static int Count [get]
 获取引用池的数量。 更多...
 

详细描述

引用池。

成员函数说明

◆ Acquire()

static IReference Acquire ( Type  referenceType)
static

从引用池获取引用。

参数
referenceType引用类型。
返回
引用。

◆ Acquire< T >()

static T Acquire< T > ( )
static

从引用池获取引用。

模板参数
T引用类型。
返回
引用。
类型限制
T :class 
T :IReference 
T :new() 

◆ Add()

static void Add ( Type  referenceType,
int  count 
)
static

向引用池中追加指定数量的引用。

参数
referenceType引用类型。
count追加数量。

◆ Add< T >()

static void Add< T > ( int  count)
static

向引用池中追加指定数量的引用。

模板参数
T引用类型。
参数
count追加数量。
类型限制
T :class 
T :IReference 
T :new() 

◆ ClearAll()

static void ClearAll ( )
static

清除所有引用池。

◆ GetAllReferencePoolInfos()

static ReferencePoolInfo [] GetAllReferencePoolInfos ( )
static

获取所有引用池的信息。

返回
所有引用池的信息。

◆ Release()

static void Release ( IReference  reference)
static

将引用归还引用池。

参数
reference引用。

◆ Remove()

static void Remove ( Type  referenceType,
int  count 
)
static

从引用池中移除指定数量的引用。

参数
referenceType引用类型。
count移除数量。

◆ Remove< T >()

static void Remove< T > ( int  count)
static

从引用池中移除指定数量的引用。

模板参数
T引用类型。
参数
count移除数量。
类型限制
T :class 
T :IReference 

◆ RemoveAll()

static void RemoveAll ( Type  referenceType)
static

从引用池中移除所有的引用。

参数
referenceType引用类型。

◆ RemoveAll< T >()

static void RemoveAll< T > ( )
static

从引用池中移除所有的引用。

模板参数
T引用类型。
类型限制
T :class 
T :IReference 

属性说明

◆ Count

int Count
staticget

获取引用池的数量。

◆ EnableStrictCheck

bool EnableStrictCheck
staticgetset

获取或设置是否开启强制检查。