/** * Represents a pool that manages a set of reusable objects. */ export declare class ObjectPool { private readonly factory; private readonly destroy; private pool; /** * Creates an instance of ObjectPool. * * @param factory A function used to create a new object when the pool is empty. * @param destroy A function used to destroy objects when clearing the pool. */ constructor(factory: () => T, destroy: (obj: T) => void); /** * Acquires an object from the pool or creates a new one if the pool is empty. * * @return {T} An object from the pool or a new one if the pool is empty. */ acquire(): T; /** * Releases an object back into the pool for reuse. * * @param obj The object to be released into the pool. */ release(obj: T): void; /** * Destroys all objects in the pool and empties it. */ clear(): void; } //# sourceMappingURL=native_pool.d.ts.map