Transition.embed keeps view controllers in memory
marionauta opened this issue · 1 comments
marionauta commented
I was using ViewTransition.embed
to change between fullscreen view controllers in my app, when I noticed the previous one was still in memory even if you can't see it (because a new one is fullscreen). For my use case, I want them gone!
I wrote an extension (named it switchTo
) that adds a new transition that acts pretty much the same as embed
but it removes all other children view controllers from the container, effectively removing them from memory.
I'm happy to submit a PR with this transition if it's something the project would find useful.
pauljohanneskraft commented
This is a nice addition - Thank you.
I will close this issue, since there is a pull request open already and we can discuss everything going forward over there.