I spent some time playing my arcade game on an iPhone 3G, and noticed occasional stutters in the game (about once every 6 or 7 levels) that are not apparent on the iPhone 4. Research says this may be due to garbage collection caused by the Instantiate and Destroy commands I use. The solution is to recycle rather than create and destroy.
Despite coming back to the subject regularly over the last week, I still do not understand the process. Whenever the subject is in enough depth, it also introduces other concepts as well. Having to understand which is relevant to my problem makes it doubly difficult. I was considering just leaving the stutters there, but I don’t want to do that.
Could someone please explain how I create an object so that it can be reused, how to activate that particular object when needed, and how to deactivate it?
To keep it simple. How would it work with a single enemy? (my enemies include child objects if that needs special consideration).