From e2c99e84fa6e2c99a8af067f6b16cb75a2b79c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 25 May 2012 16:56:21 +0200 Subject: Spin: eiotas_spin_release_particle, release merged, call eiotas_particle_reset --- src/lib/eiotas_spin.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/eiotas_spin.c b/src/lib/eiotas_spin.c index 195b772..e0f8231 100644 --- a/src/lib/eiotas_spin.c +++ b/src/lib/eiotas_spin.c @@ -68,7 +68,15 @@ EAPI Eiotas_Particle* eiotas_spin_require_particle(Eiotas_Spin *spin) EAPI void eiotas_spin_release_particle(Eiotas_Spin *spin, Eiotas_Particle *particle) { - // TODO particle->reset(); + Eiotas_Particle *p; + Eina_Inlist *list; + + while (particle->merged) { + p = EINA_INLIST_CONTAINER_GET(particle->merged,Eiotas_Particle); + particle->merged = eina_inlist_remove(particle->merged,particle->merged); + eiotas_spin_release_particle(spin,p); + } + eiotas_particle_reset(particle); eina_array_push(spin->free_particles,particle); } -- cgit v1.1-2-g2b99