> Sure, having the ability to create a *variable* number of particles is a > plus by using a linked list over an array. Why have 20,000 dormant > classes/structures taking up memory when you don't have to? How about > allocating new particles? Are you supposed to scan through the entire array > each time you wish to create a new particle to find that indexes 919 and > 9294-12300 are free? By using a linked list, you can simply store a pointer > to the last particle and then add on to it as necessary.
Forgive my ignorance, but aren't you just shifting that burden (of finding empty space to store a new particle) from your own code to the heap manager? I have no idea which would be more efficient, but either way, *something* has got to look for storage space and determine that it's unused, and reclaim space that is no longer used. I would bet the performance would be close to equal; anyone know if a formal analysis of such a problem has been done? Just curious. Jim _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders