+void clearUpParticles()
+{
+ Autolock lock( particleSetLock );
+
+ // add new Particle*s to Active
+ for( setPart::iterator it = particles_To_Add.begin();
+ it != particles_To_Add.end();
+ it++ )
+ {
+ DPF(0, "Particle Insert");
+ active_Particles.insert(*it);
+ }
+ particles_To_Add.clear();
+
+ // remove dead Particle*s from Active
+ for( setPart::iterator it = particles_To_Remove.begin();
+ it != particles_To_Remove.end();
+ it++ )
+ {
+ DPF(0, "Particle Delete");
+ active_Particles.erase(*it);
+ }
+ particles_To_Remove.clear();
+}
+void clearUpPhysics()
+{
+ Autolock lock( physicsEntitySetLock );
+
+ // add new PhysicsEntity*s to Active
+ for( setPhys::iterator it = physics_To_Add.begin();
+ it != physics_To_Add.end();
+ it++ )
+ {
+ DPF(0, "Physics Insert");
+ active_Physics.insert(*it);
+ }
+ physics_To_Add.clear();
+
+ // remove dead PhysicsEntity*s from Active
+ for( setPhys::iterator it = physics_To_Remove.begin();
+ it != physics_To_Remove.end();
+ it++ )
+ {
+ DPF(0, "Physics Delete");
+ active_Physics.erase(*it);
+ }
+ physics_To_Remove.clear();
+}