This repository was archived by the owner on Apr 19, 2022. It is now read-only.

Description
Issue:
this might be an issue if an async event comes back and triggers a render between the onDestroyView and onDestroybecause the fragment view is already destroyed with the onDestroyView but we did not unsubscribe the render subscription.
Clearing the disposables in the fragments happening with the onDestroy event:
override fun onDestroy() { super.onDestroy() disposables.dispose() }
fragment lifecycle:
... onStop onDestroyView onDestroy
Reproducing the issue:
this could be reproduced if you call detach after binding the ViewModel and delaying the state observable.
detach: detach triggers the destruction of the view without calling onDestroy
delay: simulates the late render event
Solution suggestion:
Moving up the bind event to the onStart() and the unsubscription to the onStop() ?