I have been told at some stage at university (and have subsequently read in upteen places) that using instanceof
should only be used as a \'last resort\'. With this
You could use the mGameObjects container for when you need to do something on all game objects and keep a separate container only for GameGroup objects.
This will use some more memory, and when you add/remove objects you have to update both containers, but it shouldn't be a noticeable overhead, and it lets you loop very efficiently through all the objects.