API Reference › Pool
namespace

Pool

Entity-pool statistics. Ludic's ECS is already pool-based: the allocator recycles freed entity slots through a freelist (a despawned slot is reused by the next spawn before any new slot is taken), and component storage is fixed per-entity arrays — so spawning and despawning many entities per frame does no per-spawn heap allocation and cannot fragment. Pool.live / Pool.free / Pool.reserved / Pool.capacity read those counters so a bullet-hell or horde game can watch reuse and budget against the cap.

Pool.live() -> intHow many entities are currently alive.Pool.free() -> intHow many freed slots are waiting to be reused.Pool.reserved() -> intHigh-water: how many slots have ever been allocated.Pool.capacity() -> intThe maximum number of entities.
← All symbols