Basics
Guides
API Reference
Basics
Guides
API Reference
[21:14] static extends: object
Helper for FXGL's Pools static utility
(com.almasb.fxgl.core.pool.Pools), a libGDX-style object pool
registry. Used to recycle high-frequency allocations (bullets,
particles, short-lived events) by class.
Usage:
bullet = Pools.obtain("com.mygame.Bullet");
...
Pools.free(bullet);
Custom Pool implementations can be registered via
Pools.set(ClassName, PoolAjo).
obtain (string ClassName)
Returns a pooled instance of the named class. The class must have a no-args constructor (the default ReflectionPool requirement) or a custom Pool must have been set via
setfirst.
ClassName is the fully qualified class name.An AussomJavaObject around the pooled instance.free (object ObjAjo)
Returns the object to its pool. No-op if the object's class has no registered pool.
ObjAjo is the object to return.set (string ClassName, object PoolObj)
Registers a custom Pool for the named class.
ClassName is the fully qualified class name.PoolObj is an AussomJavaObject around a Pool
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.