MCPcopy Create free account
hub / github.com/melonjs/melonJS / destroy

Method destroy

packages/melonjs/src/lighting/light2d.ts:281–287  ·  view source on GitHub ↗

* Destroy function * @ignore

()

Source from the content-addressed store, hash-verified

279 * @ignore
280 */
281 override destroy() {
282 colorPool.release(this.color);
283 ellipsePool.release(this.visibleArea);
284 // The Canvas renderer's per-light gradient cache entry (if any) becomes
285 // GC-eligible via its WeakMap once this Light2d is no longer referenced.
286 super.destroy();
287 }
288}

Callers

nothing calls this directly

Calls 2

releaseMethod · 0.65
destroyMethod · 0.65

Tested by

no test coverage detected