In your tutorial on Snapshots, it is mentioned that “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.”
Is there a proper way in which I should approach timing for removing these child objects as soon as possible? For example, since invalidate will “re-render the children to a texture on the next render pass.”, I’m looking for a way in which I can be 100% sure the image has finished rendering before I delete the objects.
If I, say, use a timer, how much time should I give after the invalidate call to be 100% assured the the re-rendering has finished? Would it vary on different devices? Or is there possible some type of callback or any other type of approach?
Thank you!