You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG: In the update method of the ParticleSystem, the particle objects are not correctly recycled back to the object pool. Here, the incorrect reference p of Point2D is used for the recycling process. #1417
override fun onUpdate(tpf: Double) {
emitters.forEach { (emitter, p) ->
val particlesList = particles[emitter]!!
particlesList.addAll(emitter.emit(p.x, p.y))
val iter = particlesList.iterator()
while (iter.hasNext()) {
val particle = iter.next()
if (particle.update(tpf)) {
iter.remove()
pane.children.remove(particle.view)
Pools.free(p) //# Here, the incorrect objects have been retrieved.
} else {
if (particle.view.parent == null)
pane.children.add(particle.view)
}
}
}
}