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

Presentation Model may not be saved? #15

Closed
belinwu opened this issue Dec 27, 2016 · 1 comment
Closed

Presentation Model may not be saved? #15

belinwu opened this issue Dec 27, 2016 · 1 comment
Assignees

Comments

@belinwu
Copy link

belinwu commented Dec 27, 2016

If onSaveInstanceState() called before remote api callback, Presentation Model may not be saved?

@andrzejchm
Copy link
Owner

it might depend on exact Android implementation, but if your model is stored as Parcelable there is a good chance system will not persist it until it really needs, even though it called onSaveInstanceState. It might just hold the reference until it is really needed and the memory is low. But I would not make any assumptions on that and would suggest to either cancel api call in detachView or onDestroy, or check whether the model contains the data that came from API callback on each attachView. (Assuming you saved this data into the model after in the callback)

@andrzejchm andrzejchm self-assigned this Sep 28, 2017
@belinwu belinwu closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants