I’m using Snapshots mainly for this feature that’s discussed in the Snapshot Tutorial… “Better yet, if you create a snapshot and don’t need to re-render or update its contents later, you can remove the objects that were used to create the snapshot and free up the related texture memory.”
In other words, I would like to delete the objects added to the snapshot as soon as possible (after inserting them to the canvas) to free up memory usage while they remain in the snapshot image.
The only problem is what am I supposed to do regarding this Gotcha? “When an app is suspended, the Android OS removes all OpenGL textures from memory. When the app is resumed, Corona must reload all images, but the capture image no longer exists in memory. If you need to restore a snapshot image in Android, one solution is to save the returned capture image to file via the display.save() function. Note that this should be done immediately, not during the “applicationSuspend” or “applicationExit” system events (at those times, there will be no OpenGL textures in memory to save).”
Assuming I didn’t delete the children, then I could just invalidate. But since I deleted them, does this mean I have to say store all the positional/rotational data, recreate all these objects from scratch, and then re-add them to the snapshot? Alternatively, if I cannot use display.save() upon applicationSuspend or applicationExit, then it’s likely pretty useless to me in cases where I’m constantly updating the snapshot and would like the latest update to be saved in case the app suspends… in which case I would have to constantly be calling display.save(), correct?
Are those my only options? Or are there any other alternative?