Fedora
02/26/2021, 4:45 PMby inject
like this: private val presenter: MySamplePresenter by inject { parametersOf(requireContext(), get()) }
at the top of the Fragment? (not in lifecycle events like onViewCreated etc). Is this gonna cause a memory leak on screen rotation? (cause then fragment is retained during configuration change but view is destroyed and recreated)arnaud.giuliani
02/26/2021, 5:13 PMtynn
02/27/2021, 9:02 AMrequireContext()
part might raise some issues. Try to use androidContext()
within your factory instead. Or maybe try to not use a context within your presenter...