From 2a3d9952a182bae6920ed55fb8d57ffbe7b56682 Mon Sep 17 00:00:00 2001 From: Sven Bendel Date: Wed, 8 Feb 2017 15:11:28 +0100 Subject: [PATCH] #69 Add remark about keeping strong reference to RXSharedPreferences --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0312323..e5c07c1 100755 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(co RxSharedPreferences rxPreferences = RxSharedPreferences.create(preferences); ``` +*Hint: Keep a strong reference on your `RxSharedPreferences` instance for as long as you want to observe them to prevent listeners from being GCed.* + Create individual `Preference` objects: ```java