I have “a same type” of Enemy GameObject that will show up on screen, but no more than 10 at a time.
At first i could just easily Instantiate and Destroy, which is actually easier to implement too.
However after reading from the forum, it looks like Destroy Instantiate could “sometimes” cause a memory
problem, because we don’t know when the Garbage Collector will run, and also how much garbage is left
hanging on the memory and causing out of memory.
In theory i thought Instantiate/Destroy would be better, because i only need to make 1 prefab and instantiate it when i need it (so the memory can be used by other stuff),
while compared to Show/Hide method, i have to prepare a total of 10 object (in array) that occupied the memory. (Also it’s slightly harder to code too :P)
So my question is, for this Iphone case do you guys think it’s better to use Show/Hide method rather than Instantiate/Destroy ??
thanks a lot in advance