3 ms·
> Freeing it is a bit of pain of course, but you could build a freelist out of the chunks that are free. If you want a much longer explanation of this techniqu
by munificent 13y ago
> Freeing it is a bit of pain of course, but you could build a freelist out of the chunks that are free.
If you want a much longer explanation of this technique, I wrote a chapter about object pools[1] that discusses exactly this[2].
[1] http://gameprogrammingpatterns.com/object-pool.html
[2] http://gameprogrammingpatterns.com/object-pool.html#faster-particle-creation