3 ms·
You have things that only live for a short while do you not? Object pooling, stack allocation, etc are designed to solve that problem as I understand it.
by AlphaSite 10y ago
You have things that only live for a short while do you not? Object pooling, stack allocation, etc are designed to solve that problem as I understand it.
- phantarch 10y agoWhile the objects in the pools or stacks may seem transient (on your screen for only a few moments), one simple technique is to only allocate those objects at load time and then flip them in an "on" or "off" state during gameplay. That way you're not doing any real allocation after your game space has loaded.
- jblow 10y agoNo, those are only seen as "ways to solve the problem" by the functional-style programmers who created the problem in the first place. Stack allocation is what your computer is built from the ground up to do. It is not some kind of workaround or optimization, it is how software was originally designed to work.