跳至主要內容

Class: release

muzzik小于 1 分钟

index / release

Class: release

对象释放器

Remarks

  • 统一 (cc.Node/cc.Asset) 资源的释放逻辑

  • 可以通过 function 或继承添加自定义释放逻辑

Table of contents

Constructors

Methods

Constructors

constructor

new release()

Methods

add

add<T>(object_): T

添加释放对象

Type parameters

NameType
Textends release_param_type

Parameters

NameTypeDescription
object_T要跟随模块释放的对象或列表

Returns

T

Defined in

assets/@framework/mk_release.ts:26open in new window


release

release(object_?): Promise<void>

释放对象

Parameters

NameTypeDescription
object_?release_param_type指定对象

Returns

Promise<void>

Defined in

assets/@framework/mk_release.ts:55open in new window


release_all

release_all(): Promise<void>

释放所有对象

Returns

Promise<void>

Defined in

assets/@framework/mk_release.ts:75open in new window

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