import { Disposable } from '../utils/Disposable.js'; /** * Generic object pool for reusing expensive-to-create objects. * * Reduces GC pressure by recycling objects instead of creating/destroying them each frame. * Used internally for ReelSymbol instances and available to game code for trails, particles, etc. * * @typeParam T - The type of object to pool. */ export declare class ObjectPool implements Disposable { private _factory; private _reset?; private _dispose?; private _maxPerKey; private _pools; /** Mirror of every item currently held in a pool, for O(1) double-release detection. */ private _pooled; private _isDestroyed; constructor(_factory: (key: string) => T, _reset?: ((item: T) => void) | undefined, _dispose?: ((item: T) => void) | undefined, _maxPerKey?: number); get isDestroyed(): boolean; /** * Get an object from the pool, or create a new one if the pool is empty. */ acquire(key: string): T; /** * Return an object to the pool for reuse. * If the pool is at capacity, the object is disposed instead. */ release(key: string, item: T): void; /** Get the number of pooled items for a key. */ size(key: string): number; /** Get total pooled items across all keys. */ get totalSize(): number; /** Clear all pooled items, calling dispose on each. */ clear(): void; destroy(): void; } //# sourceMappingURL=ObjectPool.d.ts.map