Ashley
I asked about that in some random post, but I decided to make a "official" request, so here I am. Please
In other post you mentioned that objects place on a layout are automatically loaded into a memory and will stay loaded until layout is changed. Objects that are not placed on a layout but spawn/created in runtime are then loaded into a memory and when last instance of it will get destroyed object will be unloaded from memory. But then it turns out that even if you create or spawn objects they will stay loaded for entire layout, even when last instance is destroyed
And this is nice and good in overall, but not everytime. Sometimes you only need to create an object to do something specific and after that you don't need it anymore. But unfortunately object loaded into a memory will stay there until next layout and of you have few that kind of object then this is simply a waste of memory. Especially on mobiles where memory is very limited.
In my previous and current project (and probably any future project that will need it too) I'm using very simple yet very powerful technique (sound a bit like some super martial arts killing moves ;P). And by the way a little tip for everyone.
It involves using a R0J0hound Paster plugin. Basically all my backgrounds and UI's in game are made of a lot of instances of different sprites, tiled background, sprite fonts, 9-patched and whatever I need to make it all pretty. When everything is placed or spawn and set how I wanted then I paste it all into one Paster instance and delete them all.
This make's my layout nice and clean because I don't need to do anything with them anymore - in my current project objects count drop to 1 (just the Paster) from initial 276!
So object count is no more an issue. Unfortunately memory usage still is. Current background objects only are using over 100MB - this is after a lot of time spent on assets optimization and trying dozens of different things to do same thing. Adding one image that represents same content and same resolution takes only about 16MB! But doing it like this, using an image instead of all the assets, I'm loosing all randomness on level generation. And here comes the Paster. After pasting everything I get more less same memory usage as with normal image but I still have my randomness every time layout is started! And even that I still have control over Paster resolution, so I can make it a bit less pretty and save extra few MB.
So once again, pretty please for adding an "Unload" action
I don't want to make a hard choice between making my game pretty or playable on as many mobiles as I can