跳至主要內容

Class: obj_pool<CT>

muzzik小于 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

NameType
init_config<CT>

Defined in

assets/@framework/mk_obj_pool.ts:87open in new window

Accessors

valid_b

get valid_b(): boolean

有效状态

Returns

boolean

Defined in

assets/@framework/mk_obj_pool.ts:96open in new window

Methods

put

put(obj_): Promise<void>

导入对象

Parameters

NameTypeDescription
obj_any添加对象

Returns

Promise<void>

Defined in

assets/@framework/mk_obj_pool.ts:113open in new window


get

get(): Promise<CT>

获取对象

Returns

Promise<CT>

Defined in

assets/@framework/mk_obj_pool.ts:137open in new window


clear

clear(): Promise<void>

清空数据

Returns

Promise<void>

Defined in

assets/@framework/mk_obj_pool.ts:160open in new window


destroy

destroy(): Promise<void>

销毁对象池

Returns

Promise<void>

Remarks

销毁后将无法 get/put

Defined in

assets/@framework/mk_obj_pool.ts:173open in new window

📣 觉得很赞?分享给你的朋友吧!