Retaining Presenter on configuration change with minimal overhead.
Nikita Kozlov

What have I experienced from tests is that you are always adding presenter to mPresenterManager in attachViewToPresenter() method in PresenterFragment (line 108), which means that HashMap<UUID, Presenter> in PresenterManager is getting bigger and bigger every time user goes home → back to app → home → back to app etc… Is this a bug or intended behavior for some reason that I don’t understand? I also have some weird NPE in getPresenter() method on line 26, like mPresenterManager is somehow null. This is happening very very rarely and I cannot reproduce it on a regular basis. App is working 98% of the time and then 2% NPE happens and I don’t know if this is somehow connected with previous issue. I am mostly using PresenterFragment and I have setup like you in your demo examples.

Like what you read? Give Nemanja Mladenović a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.