Improved post-game memory cleanup