Home > @esengine/ecs-framework-monorepo > ComponentPool
ComponentPool class
组件对象池,用于复用组件实例以减少内存分配
Signature:
typescript
export declare class ComponentPool<T extends Component>
Constructors
Constructor | Modifiers | Description |
---|---|---|
Constructs a new instance of the |
Methods
Method | Modifiers | Description |
---|---|---|
获取一个组件实例 | ||
清空对象池 | ||
获取池中可用对象数量 | ||
获取池的最大容量 | ||
预填充对象池 | ||
释放一个组件实例回池中 |