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

Method _isSceneCleanupCandidate

packages/core/src/ECS/World.ts:489–495  ·  view source on GitHub ↗

* @zh 检查Scene是否可以被自动清理 * @en Check if a scene is eligible for auto cleanup

(sceneName: string, scene: IScene)

Source from the content-addressed store, hash-verified

487 * @en Check if a scene is eligible for auto cleanup
488 */
489 private _isSceneCleanupCandidate(sceneName: string, scene: IScene): boolean {
490 const elapsed = Date.now() - this._createdAt;
491 return !this._activeScenes.has(sceneName) &&
492 scene.entities != null &&
493 scene.entities.count === 0 &&
494 elapsed > this._config.cleanupThresholdMs!;
495 }
496
497 /**
498 * @zh 执行自动清理操作

Callers 1

cleanupMethod · 0.95

Calls 2

nowMethod · 0.80
hasMethod · 0.65

Tested by

no test coverage detected