MCPcopy Create free account
hub / github.com/esengine/esengine / clear

Method clear

packages/core/src/Utils/Pool/Pool.ts:111–120  ·  view source on GitHub ↗

* 清空池

()

Source from the content-addressed store, hash-verified

109 * 清空池
110 */
111 public clear(): void {
112 // 重置所有对象
113 for (const obj of this._objects) {
114 obj.reset();
115 }
116
117 this._objects.length = 0;
118 this._stats.size = 0;
119 this._updateMemoryUsage();
120 }
121
122 /**
123 * 压缩池(移除多余的对象)

Callers

nothing calls this directly

Calls 2

_updateMemoryUsageMethod · 0.95
resetMethod · 0.65

Tested by

no test coverage detected