MCPcopy Create free account
hub / github.com/cocos/cocos-engine / freeCmds

Method freeCmds

cocos/gfx/webgpu/webgpu-command-allocator.ts:80–87  ·  view source on GitHub ↗
(cmds: CachedArray<T>)

Source from the content-addressed store, hash-verified

78 }
79
80 public freeCmds (cmds: CachedArray<T>): void {
81 const cmdLength = cmds.length;
82 for (let i = 0; i < cmdLength; ++i) {
83 if (--cmds.array[i].refCount === 0) {
84 this._freeCmds.push(cmds.array[i]);
85 }
86 }
87 }
88
89 public release (): void {
90 const freeCmdLength = this._freeCmds.length;

Callers 2

clearCmdsMethod · 0.45
clearCmdsMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected