On Tue, Feb 23, 2010 at 6:43 PM, Glen Pike <g...@engineeredarts.co.uk> wrote: > why would you want to use more memory by storing the sprite instances in an > array or a vector when you already have a storage medium for them - the > parent container?
We're talking about only nine instances here. It would be a different matter if it were tens or hundreds of thousands, but even then the additional memory required to store another reference to them would be insignificant compared to the memory the Sprites themselves would use, and performance would be the far bigger issue. So, a descriptively named collection has a higher benefit, for readability alone. Preferably a Vector, so casting isn't necessary even when the Sprites for the bars become a proper Bar class, as they probably should. I'd still put them in their own container, though. Then the container goes on top of another with the lines. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders