Only allocate the memory once, and free it at the end of the game.