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

Method returnObject

packages/fairygui/src/core/GObjectPool.ts:64–76  ·  view source on GitHub ↗

* Return object to pool * 将对象归还到池中 * * @param obj GObject to return | 要归还的 GObject

(obj: GObject)

Source from the content-addressed store, hash-verified

62 * @param obj GObject to return | 要归还的 GObject
63 */
64 public returnObject(obj: GObject): void {
65 const url = obj.resourceURL;
66 if (!url) return;
67
68 let arr = this._pool.get(url);
69 if (!arr) {
70 arr = [];
71 this._pool.set(url, arr);
72 }
73
74 this._count++;
75 arr.push(obj);
76 }
77}

Callers 2

clearErrorStateMethod · 0.80
returnToPoolMethod · 0.80

Calls 3

getMethod · 0.65
setMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected