-
Notifications
You must be signed in to change notification settings - Fork 14
Description
there is a memory leak with AboutCoordinator
- it is added as a child into UserListCoordinator
@pauljohanneskraft we discussed this with you in slack and you adviced to removeChild
or override viewController
for fix cycle.
but I see a little problem, if we have a lot of coordinations in a child coordinator, override a viewController
is not a good solution I guess.
removeChild
decision isn't simple - we should notify coordinator from view (viewController) about we should free coordinator (if user tapped to back button) and handle some transitions which throw out from its coordinator. and then we should remove parent when transitions has been success.
the both solutions are far from perfect, right?
I have a proposal, what do you think about CoordinatorAutoreleasable
protocol with some method which takes some view controller notifies a main controller of this flow - like root controller, just not root. Ideally, of course, it will be perfect if we will be able to inherit some coordinator from this protocol and it will be deallocated automatically :)