Are there CPU overheads for offscreen / invisible images with touch events attached? (Optimisation question)

I’ve got a ton of buttons in the main game module with touch events attached.
When I return to the main menu, instead of unloading the module I’m removing the core ‘enterFrame’ event that the main game loop uses, and shifting the game display group offscreen (x = -10000000) and setting its .isVisible property to false.

Since my game has a lot of buttons (for inventories and such, say around 20 or so), is it worthwhile me also manually cancelling their ‘touch’ events, or is the overhead so minimal that really I shouldn’t worry about it?

Really its just to know if its worth it for optimisation purposes.

Barry [import]uid: 46639 topic_id: 9342 reply_id: 309342[/import]

Even if the overhead is minimal, this is something you should avoid. You’re using the memory in a very inefficient way, and god knows memory is limited on iOS hardware. [import]uid: 51516 topic_id: 9342 reply_id: 34234[/import]

Cheers. Actually it raises the question - exactly how much memory must my game fit into, and is it a shared total memory or split into code and graphics (for example)?

Regarding my original question, this was more to do with how to handle a closed inventory screen than say, whether I should keep the main menus loaded into memory while in-game (which obviously I don’t do). I’ll see about cleaning up a bit more though, but naturally one of the things about optimisation is making sure you focus your efforts where they’ll produce the best results.

Barry [import]uid: 46639 topic_id: 9342 reply_id: 34304[/import]