FXGL icon indicating copy to clipboard operation
FXGL copied to clipboard

fix: recycle particle instead of emitter position back to pool in ParticleSystem

Open evanofficial opened this issue 8 months ago • 0 comments

Fixes #1417

In ParticleSystem.onUpdate, when a particle expires it should be returned to the object pool via Pools.free(particle). Instead, Pools.free(p) was being called, which freed the emitter's Point2D position — a completely different object.

Changed Pools.free(p) → Pools.free(particle) on the removal path.

evanofficial avatar Mar 31 '26 00:03 evanofficial