diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-25 16:56:21 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-25 16:56:21 +0200 |
commit | e2c99e84fa6e2c99a8af067f6b16cb75a2b79c86 (patch) | |
tree | 2ebb7277df43965e53f0000c065b6cebdc8d5615 | |
parent | 0a233ef23e8c6209a532eed6fecceb01e7a9c3c8 (diff) | |
download | edoors-e2c99e84fa6e2c99a8af067f6b16cb75a2b79c86.zip edoors-e2c99e84fa6e2c99a8af067f6b16cb75a2b79c86.tar.gz |
Spin: eiotas_spin_release_particle, release merged, call eiotas_particle_reset
-rw-r--r-- | src/lib/eiotas_spin.c | 10 |
1 files changed, 9 insertions, 1 deletions
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); } |