Class: obj_pool<CT>
小于 1 分钟
index / obj_pool
Class: obj_pool<CT>
异步对象池
Type parameters
Name |
---|
CT |
Table of contents
Constructors
Accessors
Methods
Constructors
constructor
• new obj_pool<CT
>(init_
)
Type parameters
Name |
---|
CT |
Parameters
Name | Type |
---|---|
init_ | config <CT > |
Defined in
assets/@framework/mk_obj_pool.ts:87
Accessors
valid_b
• get
valid_b(): boolean
有效状态
Returns
boolean
Defined in
assets/@framework/mk_obj_pool.ts:96
Methods
put
▸ put(obj_
): Promise
<void
>
导入对象
Parameters
Name | Type | Description |
---|---|---|
obj_ | any | 添加对象 |
Returns
Promise
<void
>
Defined in
assets/@framework/mk_obj_pool.ts:113
get
▸ get(): Promise
<CT
>
获取对象
Returns
Promise
<CT
>
Defined in
assets/@framework/mk_obj_pool.ts:137
clear
▸ clear(): Promise
<void
>
清空数据
Returns
Promise
<void
>
Defined in
assets/@framework/mk_obj_pool.ts:160
destroy
▸ destroy(): Promise
<void
>
销毁对象池
Returns
Promise
<void
>
Remarks
销毁后将无法 get/put