Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child controllers are never deallocated #181

Closed
claustrofob opened this issue Dec 10, 2021 · 5 comments
Closed

Child controllers are never deallocated #181

claustrofob opened this issue Dec 10, 2021 · 5 comments

Comments

@claustrofob
Copy link

If a flow contributor was initialised with allowStepWhenDismissed: true then all its immediate child controllers that provide flow contributors are never deallocated.

The bug is reproducible on RxFlowDemo as well:

  1. In DashboardFlow.navigateToDashboard() set:
        return .multiple(flowContributors: [
            .contribute(
                withNextPresentable: wishListFlow,
                withNextStepper: CompositeStepper(steppers: [OneStepper(withSingleStep: DemoStep.moviesAreRequired), wishlistStepper]),
                allowStepWhenNotPresented: true,
                allowStepWhenDismissed: true
            ),
            .contribute(
                withNextPresentable: watchedFlow,
                withNextStepper: OneStepper(withSingleStep: DemoStep.moviesAreRequired),
                allowStepWhenNotPresented: true,
                allowStepWhenDismissed: true
            ),
            .contribute(
                withNextPresentable: trendingFlow,
                withNextStepper: trendingStepper,
                allowStepWhenNotPresented: true,
                allowStepWhenDismissed: true
            )
        ])
  1. In app go to Wishlist -> Movie Details Screen. Then go back and verify that MovieDetailViewController was not deallocated.
  2. Now in WishlistFlow.navigateToMovieDetailScreen change
        return .one(
            flowContributor: .contribute(
                withNextPresentable: viewController,
                withNextStepper: viewController.viewModel
            )
        )

to

return .none
  1. Now repeat step 2 and verify that MovieDetailViewController is deallocated now.
@erginbilgin
Copy link

Is there any update on this one? It seems to be the case for me too.

@twittemb
Copy link
Collaborator

Hi,

Sorry for the late answer, I’ll try to take a look ASAP.

@leolobato
Copy link

Any updates on this one? I can confirm I'm also running into this same issue.

@mgray88 mgray88 added the bug label Jun 4, 2023
@mgray88
Copy link
Collaborator

mgray88 commented Jun 9, 2023

Confirmed still exists in current version (2.13.0)

@mgray88
Copy link
Collaborator

mgray88 commented Jun 10, 2023

I can't say I've ever used this functionality and can't think of a use case for it. If anyone is able to provide a good use case I will look further into the issue.

Otherwise closing as wontfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants