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

docs: upgraded version of xam forms and changed ondestroy to use flush instead of shutdown #1506

Conversation

PureWeen
Copy link
Contributor

@PureWeen PureWeen commented Oct 6, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix and upgraded xamarin forms version

What is the current behavior? (You can also link to an open issue here)
Currently in OnDestroy on the MainActivity it was calling BlobCache.Shutdown which completely shuts down the cache from ever being used again. In cases where the MainActivity is destroyed but static things stay in memory this caused the app to stop working.

you could recreate by

  • app started
  • click back button to minimize app (this destroys the main activity)
  • start app back up and nothing renders

What is the new behavior (if this is a feature change)?

 protected override void OnDestroy()
        {
            BlobCache.LocalMachine.Flush().Wait();
            base.OnDestroy();
        }

Here's a longer discussion about this
reactiveui/Akavache#342

As an example it'd probably be good to just not use LocalMAchine all together but this works for now

What might this PR break?

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

@dnfclas
Copy link

dnfclas commented Oct 6, 2017

@PureWeen,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 1b86b94 on PureWeen:upgrade_xam_forms_change_cache_to_flush_from_shutdown into ** on reactiveui:develop**.

@ghuntley ghuntley added this to the 8.0.0 milestone Oct 7, 2017
@ghuntley ghuntley changed the title upgraded version of xam forms and changed ondestroy to use flush instead of shutdown docs: upgraded version of xam forms and changed ondestroy to use flush instead of shutdown Oct 7, 2017
@ghuntley
Copy link
Member

ghuntley commented Oct 7, 2017

Thank-you @PureWeen love your work!

@ghuntley ghuntley merged commit 08d9e58 into reactiveui:develop Oct 7, 2017
ghuntley pushed a commit that referenced this pull request Nov 6, 2017
glennawatson pushed a commit that referenced this pull request Mar 23, 2019
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants