Skip to content

Commit

Permalink
Merge pull request #16 from livefront/prepare-for-v1.1.2-release
Browse files Browse the repository at this point in the history
Prepare for v1.1.2 release
  • Loading branch information
brian-livefront authored Jun 4, 2018
2 parents 5b63064 + a7228cd commit 58f8b55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
==========

Version 1.1.2 *(2018-06-04)*
----------------------------

* Data will no longer be automatically cleared for objects that go out of memory while an app is running. It is now more strongly recommended to use the `clear` method to manually delete data for objects in the process of being discarded.

Version 1.1.1 *(2017-08-17)*
----------------------------

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ That's it! You don't have to change any of your other code. If you are using any
<a name="clear"></a>
## Clearing Data

Bridge will clear all data written to disk each time the app is loaded and it detects that there is no saved state the system is trying to restore. It will also try to automatically clear state while the app is actively used to avoid holding onto data that is no longer relevant. However, in order to guarantee that no data is retained on disk for screens that have been left, the `Bridge.clear()` method may be used:
Bridge will clear all data written to disk each time the app is loaded and it detects that there is no saved state the system is trying to restore. It is recommended, however, to also manually clear data for objects that will no longer be needed, such as an `Activity` the user has finished. For this purpose, the `Bridge.clear()` method may be used:

```java
@Override
Expand All @@ -78,6 +78,8 @@ Bridge will clear all data written to disk each time the app is loaded and it de
}
```

This method is typically safe to call without any additional logic, as it will only clear data when the current `Activity` is not undergoing a configuration change. Note that in some unique cases (such as when using a `FragmentStatePagerAdapter`) the OS will "destroy" a `Fragment` but retain its saved state `Bundle` in case it needs to reconstruct that `Fragment` from scratch later. In these cases calls to `Bridge.clear()` should be omitted.

In the event that you might like to migrate away from the use of `Bridge` but ensure that all associated data is cleared, `Bridge.clearAll` may be called at any time.

<a name="install"></a>
Expand All @@ -91,7 +93,7 @@ repositories {
}
dependencies {
compile 'com.github.livefront:bridge:v1.1.1'
compile 'com.github.livefront:bridge:v1.1.2'
}
```

Expand Down

0 comments on commit 58f8b55

Please sign in to comment.